Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.903 kb
a4afcfd Add lukerandall.zsh-theme
Luke Randall authored
1 # ZSH Theme - Preview: http://cl.ly/f701d00760f8059e06dc
2 # Thanks to gallifrey, upon whose theme this is based
3
4 local return_code="%(?..%{$fg_bold[red]%}%? ↵%{$reset_color%})"
5
5f103c7 Add fine-grained git prompt status to lukerandall.zsh-theme
Luke Randall authored
6 function my_git_prompt_info() {
7 ref=$(git symbolic-ref HEAD 2> /dev/null) || return
8 GIT_STATUS=$(git_prompt_status)
9 [[ -n $GIT_STATUS ]] && GIT_STATUS=" $GIT_STATUS"
10 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$GIT_STATUS$ZSH_THEME_GIT_PROMPT_SUFFIX"
11 }
12
13 PROMPT='%{$fg_bold[green]%}%n@%m%{$reset_color%} %{$fg_bold[blue]%}%2~%{$reset_color%} $(my_git_prompt_info)%{$reset_color%}%B»%b '
a4afcfd Add lukerandall.zsh-theme
Luke Randall authored
14 RPS1="${return_code}"
15
16 ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}("
17 ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}"
5f103c7 Add fine-grained git prompt status to lukerandall.zsh-theme
Luke Randall authored
18 ZSH_THEME_GIT_PROMPT_UNTRACKED="%%"
19 ZSH_THEME_GIT_PROMPT_ADDED="+"
20 ZSH_THEME_GIT_PROMPT_MODIFIED="*"
21 ZSH_THEME_GIT_PROMPT_RENAMED="~"
22 ZSH_THEME_GIT_PROMPT_DELETED="!"
23 ZSH_THEME_GIT_PROMPT_UNMERGED="?"
24
Something went wrong with that request. Please try again.