Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

BUG? Sh_word_split triggered in the supposed to be implicitly quoting [[-cond



Hello,
var='!hello world'; setopt shwordsplit; [[ ${${var}[1]} != '!' ]] && print
No exclamation mark detected

Output: No exclamation mark detected

local -A hsh=( key '!hello world' ); setopt shwordsplit; [[
${${hsh[key]}[1]} != '!' ]] && print No exclamation mark detected

Output: No exclamation mark detected

local -a arr=( '!hello world' ); setopt shwordsplit; [[ ${${arr[1]}[1]} !=
'!' ]] && print No exclamation mark detected

Output: No exclamation mark detected

Question: doesn't using [[ mean that the arguments are quoted ->
shwordsplit is inactive?

-- 
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zplugin
Blog: http://zdharma.org


Messages sorted by: Reverse Date, Date, Thread, Author