mirror of
https://github.com/fish-shell/fish-shell.git
synced 2026-06-04 15:51:15 -03:00
tests/fish_config prompt choose: no "embedded:functions/foo.fish" via source
Today fish script can't produce this type of behavior: $ type fish_prompt # Defined in embedded:functions/fish_prompt.fish @ line 2 The above is only created for autoloaded functions. On standalone builds, "fish_config prompt choose" uses the "source" builtin, making this line say is "Defined via `source`". In future, we might want to make things consistent (one way or the other).
This commit is contained in:
@@ -16,6 +16,14 @@ fish_config prompt show default
|
||||
# CHECK: {{\x1b\[4m}}default{{\x1b\[m}}
|
||||
# CHECK: {{.*}}@{{.*}}>{{.*}}
|
||||
|
||||
type fish_mode_prompt
|
||||
# CHECK: fish_mode_prompt is a function with definition
|
||||
# CHECK: # Defined in {{.*}}functions/fish_mode_prompt.fish @ line 2
|
||||
# CHECK: function fish_mode_prompt --description 'Displays the current mode'
|
||||
# CHECK: # {{.*}}
|
||||
# CHECK: fish_default_mode_prompt
|
||||
# CHECK: end
|
||||
|
||||
function set-all-the-prompts
|
||||
function fish_prompt
|
||||
echo left-prompt
|
||||
@@ -88,6 +96,14 @@ type fish_prompt fish_right_prompt fish_mode_prompt |
|
||||
# CHECK: function fish_mode_prompt {{.*}}
|
||||
# CHECK: # {{.*}}
|
||||
|
||||
type fish_mode_prompt
|
||||
# CHECK: fish_mode_prompt is a function with definition
|
||||
# CHECK: # Defined {{in .*/functions/fish_mode_prompt.fish @ line 2|via `source`}}
|
||||
# CHECK: function fish_mode_prompt --description 'Displays the current mode'
|
||||
# CHECK: # {{.*}}
|
||||
# CHECK: fish_default_mode_prompt
|
||||
# CHECK: end
|
||||
|
||||
fish_config theme choose non-existent-theme1
|
||||
# CHECKERR: No such theme: non-existent-theme1
|
||||
# CHECKERR: Searched {{/\S* (/\S*|and `status list-files tools/web_config/themes`)}}
|
||||
|
||||
Reference in New Issue
Block a user