diff options
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rw-r--r-- | powerlevel9k.zsh-theme | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 6de1191e..a6c77c90 100644 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -252,7 +252,7 @@ VCS_DEFAULT_FORMAT="$VCS_CHANGESET_PREFIX%F{$POWERLEVEL9K_VCS_FOREGROUND}%b%c%u% zstyle ':vcs_info:git*:*' formats "%F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_GIT_ICON')%f$VCS_DEFAULT_FORMAT" zstyle ':vcs_info:hg*:*' formats "%F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_HG_ICON')%f$VCS_DEFAULT_FORMAT" -zstyle ':vcs_info:*' actionformats " %b %F{red}| %a%f" +zstyle ':vcs_info:*' actionformats "%b %F{red}| %a%f" zstyle ':vcs_info:*' stagedstr " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_STAGED_ICON')%f" zstyle ':vcs_info:*' unstagedstr " %F{$POWERLEVEL9K_VCS_FOREGROUND}$(print_icon 'VCS_UNSTAGED_ICON')%f" @@ -371,7 +371,7 @@ prompt_vcs() { $1_prompt_segment "$0" "green" "$DEFAULT_COLOR" fi - echo -n "%F{$POWERLEVEL9K_VCS_FOREGROUND}%f$vcs_prompt " + echo -n "$vcs_prompt " fi } @@ -676,6 +676,14 @@ build_right_prompt() { } powerlevel9k_init() { + # Display a warning if the terminal does not support 256 colors + local term_colors + term_colors=$(tput colors) + if (( $term_colors < 256 )); then + print -P "%F{red}WARNING!%f Your terminal supports less than 256 colors!" + print "You should set TERM=xterm-256colors in your ~/.zshrc" + fi + setopt LOCAL_OPTIONS unsetopt XTRACE KSH_ARRAYS prompt_opts=(cr percent subst) |