1
|
1
|
new file mode 100644
|
...
|
...
|
@@ -0,0 +1,19 @@
|
|
0
|
+#RVM settings
|
|
1
|
+if [[ -s ~/.rvm/scripts/rvm ]] ; then
|
|
2
|
+ RPS1="%{$fg[yellow]%}rvm:%{$reset_color%}%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt)%{$reset_color%} $EPS1"
|
|
3
|
+fi
|
|
4
|
+
|
|
5
|
+ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[green]%}["
|
|
6
|
+ZSH_THEME_GIT_PROMPT_SUFFIX="]%{$reset_color%}"
|
|
7
|
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}*%{$reset_color%}"
|
|
8
|
+ZSH_THEME_GIT_PROMPT_CLEAN=""
|
|
9
|
+
|
|
10
|
+#Customized git status, oh-my-zsh currently does not allow render dirty status before branch
|
|
11
|
+git_custom_status() {
|
|
12
|
+ local cb=$(current_branch)
|
|
13
|
+ if [ -n "$cb" ]; then
|
|
14
|
+ echo "$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_PREFIX$(current_branch)$ZSH_THEME_GIT_PROMPT_SUFFIX"
|
|
15
|
+ fi
|
|
16
|
+}
|
|
17
|
+
|
|
18
|
+PROMPT='$(git_custom_status)%{$fg[cyan]%}[%~% ]%{$reset_color%}%B$%b '
|