From fa735d70bbfcbac3b5f83303e24a91133f9bb09b Mon Sep 17 00:00:00 2001 From: Doeke Zanstra Date: Tue, 16 Aug 2022 17:00:20 +0200 Subject: [PATCH] Fix lint SC2236 --- ok.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ok.sh b/ok.sh index da684a4..2f87d1d 100755 --- a/ok.sh +++ b/ok.sh @@ -208,7 +208,7 @@ environment variables (for internal use): read -r prompt_input if [[ $prompt_input =~ $re_num_begin ]]; then #save command to history first - if [ ! -z ${ZSH_VERSION+x} ]; then + if [ -n "${ZSH_VERSION+x}" ]; then # The Zsh way to do it builtin print -s "$args $prompt_input" else @@ -296,7 +296,7 @@ else comment_align) if [[ $# -ge 2 ]]; then export _OK_COMMENT_ALIGN=$2; shift; else >&2 echo "the comment_align argument needs a number (0..3) as 2nd argument"; fi;; verbose) export _OK_VERBOSE=2;; quiet) export _OK_VERBOSE=0;; - auto_show) if [ ! -z ${ZSH_VERSION+x} ]; then + auto_show) if [ -n "${ZSH_VERSION+x}" ]; then function _zsh_list_once { ok list-once }