zsh-users
 help / color / mirror / code / Atom feed
* Odd behavior of quoted Zsh array subtraction
@ 2021-07-23  9:39 Zach Riggle
  2021-07-23  9:51 ` Mikael Magnusson
  0 siblings, 1 reply; 4+ messages in thread
From: Zach Riggle @ 2021-07-23  9:39 UTC (permalink / raw)
  To: zsh-users

I'm sure there's a section of the manual that explains this.

I'm also sure I don't know what section it is.

    $ a=( aa bb cc dd ee  )

    $ b=( cc )

    $ echo ${a:|b}
    aa bb dd ee

    $ echo "${a:|b}"
    aa bb cc dd ee # <-- WHAT

    $ echo "${(@)a:|b}"
    aa bb dd ee

    $ echo "${a[@]:|b}"
    aa bb dd ee

All results except the first quoted expression is the expected result.

Why does the marked, quoted array-subtraction result in a different
set of values?  I would expect that array operators have precedence
over array-converted-to-scalar.  Maybe this is an "outward-in"
expansion issue?


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-07-23 17:35 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-23  9:39 Odd behavior of quoted Zsh array subtraction Zach Riggle
2021-07-23  9:51 ` Mikael Magnusson
2021-07-23 11:38   ` René Neumann
2021-07-23 17:34   ` Bart Schaefer

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).