1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

Write comparisons with double equals

This commit is contained in:
Dominik Ritter 2018-08-07 21:35:29 +02:00
parent 9cf76f99a5
commit eadbd09368

View File

@ -36,7 +36,7 @@ function getColor() {
local default="$'\033'\[49m" local default="$'\033'\[49m"
# http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html
local quoted=$(printf "%q" $(print -P "$named")) local quoted=$(printf "%q" $(print -P "$named"))
if [[ $quoted = "$'\033'\[49m" && $1 != "black" ]]; then if [[ $quoted == "$'\033'\[49m" && $1 != "black" ]]; then
# color not found, so try to get the code # color not found, so try to get the code
1=$(getColorCode $1) 1=$(getColorCode $1)
fi fi