We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b8c93af commit f563780Copy full SHA for f563780
zsh-syntax-highlighting.zsh
@@ -93,9 +93,13 @@ _zsh_highlight()
93
canonical_options=(${${${(M)raw_options:#*off}%% *}#no} ${${(M)raw_options:#*on}%% *})
94
for option in "${canonical_options[@]}"; do
95
[[ -o $option ]]
96
- # This variable cannot be eliminated c.f. workers/42101.
97
- onoff=${${=:-off on}[2-$?]}
98
- zsyh_user_options+=($option $onoff)
+ case $? in
+ (0) zsyh_user_options+=($option on);;
+ (1) zsyh_user_options+=($option off);;
99
+ (*) # Can't happen, surely?
100
+ echo "zsh-syntax-highlighting: warning: '[[ -o $option ]]' returned $?"
101
+ ;;
102
+ esac
103
done
104
fi
105
typeset -r zsyh_user_options
0 commit comments