comparison oh-my-zsh/themes/custom.zsh-theme @ 80:16edf05ad21a

Fix errors with prompt
author zegervdv <zegervdv@me.com>
date Mon, 21 Jul 2014 09:58:05 +0200
parents 642841c0badb
children a25bdb562e43
comparison
equal deleted inserted replaced
79:7d3ded16eaa2 80:16edf05ad21a
2 echo "${PWD/$HOME/~}" 2 echo "${PWD/$HOME/~}"
3 } 3 }
4 4
5 eval my_gray='$FG[237]' 5 eval my_gray='$FG[237]'
6 eval my_orange='$FG[214]' 6 eval my_orange='$FG[214]'
7
8 7
9 8
10 local git=$(git_prompt_info) 9 local git=$(git_prompt_info)
11 if [ ${#git} != 0 ]; then 10 if [ ${#git} != 0 ]; then
12 ((git=${#git} - 10)) 11 ((git=${#git} - 10))
13 else 12 else
14 git=0 13 git=0
15 fi 14 fi
16 15
17 PROMPT='%{$fg[cyan]%}%n%{$reset_color%} in %{$fg[yellow]%}%~%b%{$reset_color%} 16 PROMPT='%{$fg[cyan]%}%n%{$reset_color%} in %{$fg[yellow]%}%~%b%{$reset_color%}
18 %{$reset_color%}%(?.%{$fg[white]%}.%{$fg[red]%})→ ' 17 %{$reset_color%}%(?.%{$fg[white]%}.%{$fg[red]%})→ %{$reset_color%}'
19 18
20 19
21 RPROMPT='$my_gray$(git_prompt_info) $(git_prompt_status)%{$reset_color%}%' 20 RPROMPT='$my_gray$(git_prompt_info) $(git_prompt_status)%{$reset_color%}%'
22 21
23 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} U" 22 ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[cyan]%} U"