-v var doesn't work on older version of zsh.

As such I had to switch this to -n with parameter expansion
This commit is contained in:
James Patrick 2020-06-02 18:39:58 +00:00
parent c3f3253ea2
commit b370249ff1

View File

@ -12,7 +12,7 @@ format(){
"warn") echo -e "$Y ⚠ $2$NC";; "warn") echo -e "$Y ⚠ $2$NC";;
"pass") echo -e "$G ✔ $2$NC";; "pass") echo -e "$G ✔ $2$NC";;
"info") echo -e "$MUTED כֿ $2$NC";; "info") echo -e "$MUTED כֿ $2$NC";;
"debug") [ -v debug ] && $0 info $2 ; true ;; "debug") [[ -n ${debug+x} ]] && $0 info $2 ; true ;;
"header") echo -e "=> $2";; "header") echo -e "=> $2";;
*) echo -e "$1: $2";; *) echo -e "$1: $2";;
esac esac