diff options
author | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-31 23:34:01 +0300 |
---|---|---|
committer | Charles Peterson <cpeterson@brokerbin.com> | 2017-12-31 23:34:01 +0300 |
commit | 0c943ac6d5beebc381b3e49858a5ef6861289d29 (patch) | |
tree | 291f558b0fca70edd8f077ba28400f73bfe7b973 /powerlevel9k.zsh-theme | |
parent | ef0f8f0ba4afb4e81cd931fea1fb81edf8c5633d (diff) |
colors checking optimized and added tput for check the colors
moved to colors functions, because it makes sense.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-x | powerlevel9k.zsh-theme | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 79f7208b..b50ce64d 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -1572,14 +1572,7 @@ prompt_powerlevel9k_setup() { setopt noprompt{bang,cr,percent,sp,subst} "prompt${^prompt_opts[@]}" # Display a warning if the terminal does not support 256 colors - local term_colors - term_colors=$(echotc Co 2>/dev/null) - if (( ! $? && ${term_colors:-0} < 256 )); then - print -P "%F{red}WARNING!%f Your terminal appears to support fewer than 256 colors!" - print -P "If your terminal supports 256 colors, please export the appropriate environment variable" - print -P "_before_ loading this theme in your \~\/.zshrc. In most terminal emulators, putting" - print -P "%F{blue}export TERM=\"xterm-256color\"%f at the top of your \~\/.zshrc is sufficient." - fi + termColors # If the terminal `LANG` is set to `C`, this theme will not work at all. local term_lang |