* BUG? Sh_word_split triggered in the supposed to be implicitly quoting [[-cond @ 2019-11-05 12:22 ` Sebastian Gniazdowski 2019-11-05 13:28 ` Peter Stephenson 0 siblings, 1 reply; 2+ messages in thread From: Sebastian Gniazdowski @ 2019-11-05 12:22 UTC (permalink / raw) To: Zsh hackers list [-- Attachment #1: Type: text/plain, Size: 716 bytes --] 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 ^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: BUG? Sh_word_split triggered in the supposed to be implicitly quoting [[-cond 2019-11-05 12:22 ` BUG? Sh_word_split triggered in the supposed to be implicitly quoting [[-cond Sebastian Gniazdowski @ 2019-11-05 13:28 ` Peter Stephenson 0 siblings, 0 replies; 2+ messages in thread From: Peter Stephenson @ 2019-11-05 13:28 UTC (permalink / raw) To: zsh-workers On Tue, 2019-11-05 at 13:22 +0100, Sebastian Gniazdowski wrote: > Question: doesn't using [[ mean that the arguments are quoted -> > shwordsplit is inactive? Only quotes mean that arguments are quoted. The complication is that there is a context where we don't split the argument because we know a single word is needed. That's not the same as forcing quoted semantics, however. Use explicit quotes for that. pws ^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-11-05 13:28 UTC | newest] Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <CGME20191105122344eucas1p28f4ea02d36275648e2734e6ff6f1ef0e@eucas1p2.samsung.com> 2019-11-05 12:22 ` BUG? Sh_word_split triggered in the supposed to be implicitly quoting [[-cond Sebastian Gniazdowski 2019-11-05 13:28 ` Peter Stephenson
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).