f2f34f5404e8ab674a0e345a709783b6c56a3b72
- Author
- Thomas J Bradley <theman@thomasjbradley.ca>
- Committer
- Robby Russell <robby@planetargon.com>
- Date
Message
Added my zsh theme file, heavily based on sjl's
Diff
1diff --git a/themes/thomasjbradley.zsh-theme b/themes/thomasjbradley.zsh-theme
2new file mode 100644
3index 0000000000000000000000000000000000000000..857301d190682ded736a72afe0d88d7ee88a39ea
4--- /dev/null
5+++ b/themes/thomasjbradley.zsh-theme
6@@ -0,0 +1,29 @@
7+function prompt_char {
8+ git branch >/dev/null 2>/dev/null && echo '±' && return
9+ hg root >/dev/null 2>/dev/null && echo '☿' && return
10+ echo '○'
11+}
12+
13+function virtualenv_info {
14+ [ $VIRTUAL_ENV ] && echo '('`basename $VIRTUAL_ENV`') '
15+}
16+
17+function hg_prompt_info {
18+ hg prompt --angle-brackets "\
19+< on %{$fg[magenta]%}<branch>%{$reset_color%}>\
20+< at %{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\
21+%{$fg[green]%}<status|modified|unknown><update>%{$reset_color%}<
22+patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null
23+}
24+
25+PROMPT='
26+%{$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)
27+$(virtualenv_info)$(prompt_char) '
28+
29+ZSH_THEME_GIT_PROMPT_PREFIX=" on %{$fg[magenta]%}"
30+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
31+ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}!"
32+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?"
33+ZSH_THEME_GIT_PROMPT_CLEAN=""
34+
35+. ~/bin/dotfiles/zsh/aliases