zsh-workers
 help / color / mirror / code / Atom feed
* Why do we need to quote # in ${(#):-2\#1011010} ?
@ 2021-09-12  8:11 Stephane Chazelas
  2021-09-12 17:43 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Stephane Chazelas @ 2021-09-12  8:11 UTC (permalink / raw)
  To: Zsh hackers list

$ echo ${:-2#1011010}
2#1011010

That # is fine when not quoted there, so why:

$ echo ${(#):-2#1011010}

$ echo ${(#):-2\#1011010}
Z

?

It seems to discard everything after the expansion within the word:

$ echo before${(#):-2#1011010}"hey, where did that go?" other args
before other args

-- 
Stephane


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

end of thread, other threads:[~2021-09-12 17:44 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-09-12  8:11 Why do we need to quote # in ${(#):-2\#1011010} ? Stephane Chazelas
2021-09-12 17:43 ` 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).