From f3b950157de40b07afb6fd14946e20b98c9b5e26 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Wed, 29 Sep 2021 03:12:39 -0700 Subject: [PATCH] Remove special case for fish_right_prompt in config.fish --- share/functions/fish_config.fish | 13 ++----------- share/functions/funcsave.fish | 2 +- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/share/functions/fish_config.fish b/share/functions/fish_config.fish index 94474ec12..18b0fd595 100644 --- a/share/functions/fish_config.fish +++ b/share/functions/fish_config.fish @@ -96,7 +96,7 @@ function fish_config --description "Launch fish's web based configuration" end # Erase the right prompt if it didn't have any. - if functions -q fish_right_prompt; and test (functions --details fish_right_prompt) != $have[1] + if functions -q fish_right_prompt; and test (functions --details fish_right_prompt) != $have[1] functions --erase fish_right_prompt end case save @@ -123,16 +123,7 @@ function fish_config --description "Launch fish's web based configuration" funcsave fish_prompt or return - if functions -q fish_right_prompt; and test (functions --details fish_right_prompt) = $have[1] - # We just read a right prompt, save it. - funcsave fish_right_prompt - else if test -e "$__fish_config_dir/functions/fish_right_prompt.fish"; and test (functions --details fish_right_prompt) != "$have[1]" - # We used to have a right prompt, overwrite it with an empty one. - function fish_right_prompt - end - funcsave fish_right_prompt - end - + funcsave fish_right_prompt return else echo Not overwriting diff --git a/share/functions/funcsave.fish b/share/functions/funcsave.fish index 585ef463f..e9bb66e1b 100644 --- a/share/functions/funcsave.fish +++ b/share/functions/funcsave.fish @@ -1,5 +1,5 @@ function funcsave --description "Save the current definition of all specified functions to file" - set -l q options h/help d/directory= + set -l options q h/help d/directory= argparse -n funcsave $options -- $argv or return