diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-03-27 02:09:41 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-03-27 02:33:21 +0300 |
commit | 9a895bc7e4c925658a9c57681437000445f399ed (patch) | |
tree | 8ed7d86bcb1cd9f40cea951a6f2afe9a6dd592a5 /functions/colors.zsh | |
parent | 99f142de36630c141f7c8959563f15730b568b3c (diff) |
Make variables local
Diffstat (limited to 'functions/colors.zsh')
-rwxr-xr-x | functions/colors.zsh | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/functions/colors.zsh b/functions/colors.zsh index f421165c..e98bfd4f 100755 --- a/functions/colors.zsh +++ b/functions/colors.zsh @@ -35,11 +35,11 @@ function getColor() { fi else # named color added to parameter expansion print -P to test if the name exists in terminal - named="%K{$1}" + local named="%K{$1}" # https://misc.flogisoft.com/bash/tip_colors_and_formatting - default="$'\033'\[49m" + local default="$'\033'\[49m" # http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html - quoted=$(printf "%q" $(print -P "$named")) + local quoted=$(printf "%q" $(print -P "$named")) if [[ $quoted = "$'\033'\[49m" && $1 != "black" ]]; then # color not found, so try to get the code 1=$(getColorCode $1) |