Use $suffix in classic_vcs prompt instead of hardcoding to '>'

Also, ensure that suffix is local in both classic_vcs.fish and informative_vcs.fish.

Fixes #3991
This commit is contained in:
David Bishop 2017-04-26 12:12:42 -06:00 committed by Kurtis Rader
parent 5604bb238e
commit 2565c5c15b
2 changed files with 3 additions and 1 deletions

View file

@ -48,6 +48,7 @@ function fish_prompt --description 'Write out the prompt'
set -l color_cwd
set -l prefix
set -l suffix
switch $USER
case root toor
if set -q fish_color_cwd_root
@ -66,5 +67,5 @@ function fish_prompt --description 'Write out the prompt'
set prompt_status ' ' (set_color $fish_color_status) "[$last_status]" "$normal"
end
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $fish_color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (__fish_vcs_prompt) $normal $prompt_status "> "
echo -n -s (set_color $fish_color_user) "$USER" $normal @ (set_color $fish_color_host) (prompt_hostname) $normal ' ' (set_color $color_cwd) (prompt_pwd) $normal (__fish_vcs_prompt) $normal $prompt_status $suffix " "
end

View file

@ -67,6 +67,7 @@ function fish_prompt --description 'Write out the prompt'
set -l color_cwd
set -l prefix
set -l suffix
switch $USER
case root toor
if set -q fish_color_cwd_root