Browse code

Merge branch 'master' of https://github.com/Rixius/oh-my-zsh into Rixius-master

Robby Russell authored on 14/01/2011 at 14:54:49
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,24 @@
0
+# /|/ Code by Stephen
1
+# /|/ "Rixius" Middleton
2
+# 
3
+# name in folder (github)
4
+# ± if in github repo, or ≥ if otherwise Time in 24-hour format is on right.
5
+function collapse_pwd {
6
+    echo $(pwd | sed -e "s,^$HOME,~,")
7
+}
8
+function prompt_char {
9
+    echo -n "%{$bg[white]%}%{$fg[red]%}"
10
+    git branch >/dev/null 2>/dev/null && echo "±%{$reset_color%}" && return
11
+    echo "≥%{$reset_color%}"
12
+}
13
+RIXIUS_PRE="%{$bg[white]%}%{$fg[red]%}"
14
+
15
+PROMPT='
16
+%{$RIXIUS_PRE%}%n%{$reset_color%} in %{$fg_bold[green]%}$(collapse_pwd)%{$reset_color%}$(git_prompt_info)
17
+$(prompt_char) '
18
+RPROMPT='%{$RIXIUS_PRE%}%T%{$reset_color%}'
19
+
20
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
21
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
22
+ZSH_THEME_GIT_PROMPT_DIRTY=" %{$RIXIUS_PRE%}!%{$reset_color%}"
23
+ZSH_THEME_GIT_PROMPT_CLEAN=" %{$RIXIUS_PRE%}√%{$reset_color%}"