1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-12-18 02:20:09 +00:00

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
setopt | grep -q extendedglob
wd_extglob_is_set=$?
[[ $wd_extglob_is_set ]] && setopt noextendedglob
(( ! $wd_extglob_is_set )) && setopt noextendedglob
# load warp points
typeset -A points
@ -484,7 +484,7 @@ fi
# if not, next time warp will pick up variables from this run
# 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_warp