fix(wd): use (( )) instead of [[ ]]

zsh versions prior to 5.0.6 mark `[[ <num> ]]` as invalid syntax

Closes #12017
This commit is contained in:
Carlo Sala 2023-11-01 21:24:28 +01:00
parent 38c01a235f
commit 632ed413a9

View File

@ -396,7 +396,7 @@ fi
# disable extendedglob for the complete wd execution time # disable extendedglob for the complete wd execution time
setopt | grep -q extendedglob setopt | grep -q extendedglob
wd_extglob_is_set=$? wd_extglob_is_set=$?
[[ $wd_extglob_is_set ]] && setopt noextendedglob (( ! $wd_extglob_is_set )) && setopt noextendedglob
# load warp points # load warp points
typeset -A points typeset -A points
@ -484,7 +484,7 @@ fi
# if not, next time warp will pick up variables from this run # if not, next time warp will pick up variables from this run
# remember, there's no sub shell # remember, there's no sub shell
[[ $wd_extglob_is_set ]] && setopt extendedglob (( ! $wd_extglob_is_set )) && setopt extendedglob
unset wd_extglob_is_set unset wd_extglob_is_set
unset wd_warp unset wd_warp