diff options
| author | zghember <zghpku@gmail.com> | 2015-01-03 14:41:34 +0800 | 
|---|---|---|
| committer | zghember <zghpku@gmail.com> | 2015-01-03 14:41:34 +0800 | 
| commit | 8105d4acc960229e8c7fa9dc6936d8ce881c6b8d (patch) | |
| tree | 3c3ead3f01aa7cfc645155a3c992f046ec328155 /themes | |
| parent | 6fd0b73e9aba568640005798f737cd73ad0bfdf4 (diff) | |
| parent | 175b4a807383530aa75145b5b6fdedb3ce1f11f2 (diff) | |
| download | zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.tar.gz zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.tar.bz2 zsh-8105d4acc960229e8c7fa9dc6936d8ce881c6b8d.zip | |
Merge commit '175b4a807383530aa75145b5b6fdedb3ce1f11f2'
Diffstat (limited to 'themes')
| -rw-r--r-- | themes/agnoster.zsh-theme | 4 | ||||
| -rw-r--r-- | themes/bureau.zsh-theme | 2 | ||||
| -rw-r--r-- | themes/mira.zsh-theme | 29 | ||||
| -rw-r--r-- | themes/mortalscumbag.zsh-theme | 6 | ||||
| -rw-r--r-- | themes/rkj-repos.zsh-theme | 2 | 
5 files changed, 36 insertions, 7 deletions
| diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 7a62bd860..8c7be6e01 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -123,10 +123,10 @@ prompt_hg() {        st=""        rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g')        branch=$(hg id -b 2>/dev/null) -      if `hg st | grep -Eq "^\?"`; then +      if `hg st | grep -q "^\?"`; then          prompt_segment red black          st='±' -      elif `hg st | grep -Eq "^(M|A)"`; then +      elif `hg st | grep -q "^(M|A)"`; then          prompt_segment yellow black          st='±'        else diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 443d1d5ee..148abec10 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -31,7 +31,7 @@ bureau_git_status () {    if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then      _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"    fi -  if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then +  if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then      _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED"    fi    if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then diff --git a/themes/mira.zsh-theme b/themes/mira.zsh-theme new file mode 100644 index 000000000..e6c952998 --- /dev/null +++ b/themes/mira.zsh-theme @@ -0,0 +1,29 @@ +# Based on bira zsh theme with nvm, rvm and jenv support +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' +local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' + +local rvm_ruby='' +if which rvm-prompt &> /dev/null; then +  rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' +else +  if which rbenv &> /dev/null; then +    rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' +  fi +fi + +local nvm_node='' +nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}' + +local jenv_java='' +jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}' + +local git_branch='$(git_prompt_info)%{$reset_color%}' + +PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch} +╰─%B$%b " +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 5dbf2e4f6..ccce4197a 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -10,12 +10,12 @@ function my_git_prompt() {    fi    # is anything staged? -  if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then +  if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then      STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED"    fi    # is anything unstaged? -  if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then +  if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then      STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED"    fi @@ -25,7 +25,7 @@ function my_git_prompt() {    fi    # is anything unmerged? -  if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then +  if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then      STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED"    fi diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 6289427c2..eed084f15 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -4,7 +4,7 @@  function hg_prompt_info {      hg prompt --angle-brackets "\ -<hg:%{$fg[magenta]%}<branch>%{$reset_color%}>\ +<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\  </%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\  %{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}<  patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null | 
