From 73fbd5d994e6db7530a9daeb9823661f43a09a88 Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Wed, 15 Oct 2025 10:42:57 +0200 Subject: [PATCH] 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). --- tests/checks/fish_config.fish | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/checks/fish_config.fish b/tests/checks/fish_config.fish index 23394e220..efc08c9ac 100644 --- a/tests/checks/fish_config.fish +++ b/tests/checks/fish_config.fish @@ -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`)}}