Merge branch pull request #152 from bachue/robbyrussell_fish_prompt

This commit is contained in:
Bruno Pinto 2014-05-02 10:44:39 -03:00
commit 2ad8fb98a0
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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) ]