mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 12:53:13 +00:00
[Informative VCS Prompt] Print failing exit codes
Before this change, if a command failed, this was indicated by the "$" at the end of the prompt turning red. With this change in place, if a command fails, the exit code of the failing command is displayed in [square brackets].
This commit is contained in:
parent
4bcd0413f8
commit
0e9d52bc41
1 changed files with 2 additions and 2 deletions
|
@ -90,9 +90,9 @@ function fish_prompt --description 'Write out the prompt'
|
||||||
|
|
||||||
if not test $last_status -eq 0
|
if not test $last_status -eq 0
|
||||||
set_color $fish_color_error
|
set_color $fish_color_error
|
||||||
|
echo -n "[$last_status] "
|
||||||
|
set_color normal
|
||||||
end
|
end
|
||||||
|
|
||||||
echo -n "$suffix "
|
echo -n "$suffix "
|
||||||
|
|
||||||
set_color normal
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue