diff options
-rw-r--r-- | fish/.config/fish/functions/fish_prompt.fish | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/fish/.config/fish/functions/fish_prompt.fish b/fish/.config/fish/functions/fish_prompt.fish index b21d479..bcf8ef7 100644 --- a/fish/.config/fish/functions/fish_prompt.fish +++ b/fish/.config/fish/functions/fish_prompt.fish @@ -1,4 +1,6 @@ function fish_prompt + set last_status $status + if not set -q __fish_prompt_normal set -g __fish_prompt_normal (set_color normal) end @@ -19,5 +21,13 @@ function fish_prompt end end - echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" ' ▸ ' + echo -n -s 'λ ' "$__fish_prompt_cwd" (prompt_pwd) "$__fish_prompt_normal" + + if test $last_status -gt 0 + set_color $fish_color_cwd_root + echo -n -s ' ▸ ' + set_color normal + else + echo -n -s ' ▸ ' + end end |