Remove special case for fish_right_prompt in config.fish

This commit is contained in:
Aaron Gyes 2021-09-29 03:12:39 -07:00
parent ed8c78c0ea
commit f3b950157d
2 changed files with 3 additions and 12 deletions

View File

@ -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

View File

@ -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