diff --git a/themes/robbyrussell/README.md b/themes/robbyrussell/README.md index e6b6f9a..52162b9 100644 --- a/themes/robbyrussell/README.md +++ b/themes/robbyrussell/README.md @@ -1,9 +1,10 @@ ## robbyrussell The default theme – cloned from oh-my-zsh. -![robbyrussell theme](http://f.cl.ly/items/2q0v3i3y2E1F0C1R3C1y/Screen%20Shot%202013-08-06%20at%2017.52.17%20.png) +![robbyrussell theme](https://bachue.github.io/oh-my-fish/images/robbyrussell-screenshot.png) #### Characteristics * Displays git information in the command prompt when available. +* If the last command was failed, the indicator would be red, otherwise it's green diff --git a/themes/robbyrussell/fish_prompt.fish b/themes/robbyrussell/fish_prompt.fish index c4769cb..1bf0c61 100644 --- a/themes/robbyrussell/fish_prompt.fish +++ b/themes/robbyrussell/fish_prompt.fish @@ -8,13 +8,19 @@ function _is_git_dirty end function fish_prompt + set -l last_status $status set -l cyan (set_color -o cyan) set -l yellow (set_color -o yellow) set -l red (set_color -o red) set -l blue (set_color -o blue) + set -l green (set_color -o green) set -l normal (set_color normal) - set -l arrow "$red➜ " + if test $last_status = 0 + set arrow "$green➜ " + else + set arrow "$red➜ " + end set -l cwd $cyan(basename (prompt_pwd)) if [ (_git_branch_name) ]