Browse code

Added my zsh theme file, heavily based on sjl's

Thomas J Bradley authored on 26/05/2010 at 22:37:52
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,29 @@
0
+function prompt_char {
1
+    git branch >/dev/null 2>/dev/null && echo '±' && return
2
+    hg root >/dev/null 2>/dev/null && echo '☿' && return
3
+    echo '○'
4
+}
5
+
6
+function virtualenv_info {
7
+    [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
8
+}
9
+
10
+function hg_prompt_info {
11
+    hg prompt --angle-brackets "\
12
+< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
13
+< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
14
+%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
15
+patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
16
+}
17
+
18
+PROMPT='
19
+%{$fg[magenta]%}%n%{$reset_color%} at %{$fg[yellow]%}%m%{$reset_color%} in %{$fg_bold[green]%}${PWD/#$HOME/~}%{$reset_color%}$(hg_prompt_info)$(git_prompt_info)
20
+$(virtualenv_info)$(prompt_char) '
21
+
22
+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
23
+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
24
+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
25
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
26
+ZSH_THEME_GIT_PROMPT_CLEAN=""
27
+
28
+. ~/bin/dotfiles/zsh/aliases