diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2018-04-25 15:36:48 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2018-04-25 15:36:48 -0600 |
commit | 1481f7aa67df42bdf45953231637194ac200d240 (patch) | |
tree | 7d41eb6b369e3ab0f25753623c966b69340e54cf /themes | |
parent | b7b623d6de696b81d213ec666d072851561d5c06 (diff) | |
parent | 9cd3701ac0297f4bdf9673ea0dffa8ffdaea63e8 (diff) | |
download | zsh-1481f7aa67df42bdf45953231637194ac200d240.tar.gz zsh-1481f7aa67df42bdf45953231637194ac200d240.tar.bz2 zsh-1481f7aa67df42bdf45953231637194ac200d240.zip |
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'themes')
-rw-r--r-- | themes/avit.zsh-theme | 4 | ||||
-rw-r--r-- | themes/cloud.zsh-theme | 4 | ||||
-rw-r--r-- | themes/emotty.zsh-theme | 4 | ||||
-rw-r--r-- | themes/half-life.zsh-theme | 2 | ||||
-rw-r--r-- | themes/rkj-repos.zsh-theme | 7 | ||||
-rw-r--r-- | themes/steeef.zsh-theme | 2 |
6 files changed, 12 insertions, 11 deletions
diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme index 4f0dcbcc6..c43fcc9fe 100644 --- a/themes/avit.zsh-theme +++ b/themes/avit.zsh-theme @@ -50,9 +50,7 @@ function _ruby_version() { # use a neutral color, otherwise colors will vary according to time. function _git_time_since_commit() { # Only proceed if there is actually a commit. - if git log -1 > /dev/null 2>&1; then - # Get the last commit. - last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null) + if last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null); then now=$(date +%s) seconds_since_last_commit=$((now-last_commit)) diff --git a/themes/cloud.zsh-theme b/themes/cloud.zsh-theme index 4efbf9776..59a3472b6 100644 --- a/themes/cloud.zsh-theme +++ b/themes/cloud.zsh-theme @@ -6,5 +6,5 @@ PROMPT='%{$fg_bold[cyan]%}$ZSH_THEME_CLOUD_PREFIX %{$fg_bold[green]%}%p %{$fg[gr ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[green]%}[%{$fg[cyan]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]"
\ No newline at end of file +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[green]%}] %{$fg[yellow]%}⚡ %{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%}]" diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme index 34d491ff0..13adad78d 100644 --- a/themes/emotty.zsh-theme +++ b/themes/emotty.zsh-theme @@ -68,6 +68,10 @@ prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}" setopt promptsubst +# Workaround for zsh 5.2 release (kudos to @timothybasanov) +autoload +X VCS_INFO_nvcsformats +functions[VCS_INFO_nvcsformats]=${functions[VCS_INFO_nvcsformats]/local -a msgs/} + autoload -U add-zsh-hook autoload -Uz vcs_info diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index 5f987099d..8b458cde9 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -60,7 +60,7 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats "" function steeef_preexec { - case "$(history $HISTCMD)" in + case "$2" in *git*) PR_GIT_UPDATE=1 ;; diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index ba2a0dba6..65a075456 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -1,13 +1,13 @@ -# user, host, full path, and time/date -# on two lines for easier vgrepping -# entry in a nice long thread on the Arch Linux forums: http://bbs.archlinux.org/viewtopic.php?pid=521888#p521888 +# user, host, full path, and time/date on two lines for easier vgrepping function hg_prompt_info { + if (( $+commands[hg] )) && grep -q "prompt" ~/.hgrc; then hg prompt --angle-brackets "\ <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 + fi } ZSH_THEME_GIT_PROMPT_ADDED="%{$fg[cyan]%}+" @@ -33,4 +33,3 @@ function retcode() {} PROMPT=$'%{$fg_bold[blue]%}┌─[%{$fg_bold[green]%}%n%b%{$fg[black]%}@%{$fg[cyan]%}%m%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%{$fg_bold[white]%}%~%{$fg_bold[blue]%}]%{$reset_color%} - %{$fg_bold[blue]%}[%b%{$fg[yellow]%}'%D{"%Y-%m-%d %I:%M:%S"}%b$'%{$fg_bold[blue]%}] %{$fg_bold[blue]%}└─[%{$fg_bold[magenta]%}%?$(retcode)%{$fg_bold[blue]%}] <$(mygit)$(hg_prompt_info)>%{$reset_color%} ' PS2=$' \e[0;34m%}%B>%{\e[0m%}%b ' - diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index b72a41c92..88ef1ca1b 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -62,7 +62,7 @@ zstyle ':vcs_info:*:prompt:*' nvcsformats "" function steeef_preexec { - case "$(history $HISTCMD)" in + case "$2" in *git*) PR_GIT_UPDATE=1 ;; |