fisher/functions/__fisher_prompt_reset.fish
2016-02-20 09:57:51 +09:00

22 lines
694 B
Fish

function __fisher_prompt_reset
debug "Reset prompt '%s'" "$fisher_prompt"
set -U fisher_prompt
# To reset the prompt, remove any data in fisher_prompt and source any existing
# fish_prompt file as follows. First, look inside functions/ inside each of the
# given paths. If none are given, look in the user fish configuration. If none
# is found, source the default prompt inside __fish_datadir/functions.
set argv $argv (__fisher_xdg --config)/fish $__fish_datadir
for prompt in $argv/functions/fish_prompt.fish
if test -s $prompt
debug "Default prompt '%s'" $prompt
source $prompt
return
end
end
end