diff options
Diffstat (limited to 'functions')
-rwxr-xr-x | functions/colors.zsh | 6 | ||||
-rwxr-xr-x | functions/utilities.zsh | 1 |
2 files changed, 4 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) diff --git a/functions/utilities.zsh b/functions/utilities.zsh index 0f33a1b0..9a651a0b 100755 --- a/functions/utilities.zsh +++ b/functions/utilities.zsh @@ -39,6 +39,7 @@ printSizeHumanReadable() { # if the base is not Bytes if [[ -n $2 ]]; then + local idx for idx in "${extension[@]}"; do if [[ "$2" == "$idx" ]]; then break |