mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-12 08:10:07 +00:00
suppress "no such command: tput" on startup
This commit is contained in:
parent
0fa2f7ba65
commit
46d70094e2
1 changed files with 1 additions and 1 deletions
|
@ -2156,7 +2156,7 @@ _p9k_init() {
|
||||||
# Display a warning if the terminal does not support 256 colors.
|
# Display a warning if the terminal does not support 256 colors.
|
||||||
if [[ $POWERLEVEL9K_IGNORE_TERM_COLORS == false ]]; then
|
if [[ $POWERLEVEL9K_IGNORE_TERM_COLORS == false ]]; then
|
||||||
local n
|
local n
|
||||||
if { hash tput && n=$(tput colors) || n=$(echotc Co) } && (( n < 256 )); then
|
if { hash tput && n=$(tput colors) || hash echotc && n=$(echotc Co) } 2>/dev/null && (( n < 256 )); then
|
||||||
if [[ -n $n && $n -lt 256 ]]; then
|
if [[ -n $n && $n -lt 256 ]]; then
|
||||||
print -P '%F{red}WARNING!%f Your terminal appears to support fewer than 256 colors!'
|
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 'If your terminal supports 256 colors, please export the appropriate environment variable.'
|
||||||
|
|
Loading…
Reference in a new issue