From: Stephane Chazelas <stephane@chazelas.org>
To: Zsh hackers list <zsh-workers@zsh.org>
Subject: Why do we need to quote # in ${(#):-2\#1011010} ?
Date: Sun, 12 Sep 2021 09:11:51 +0100 [thread overview]
Message-ID: <20210912081151.k5cqsw6tdmkj7mi4@chazelas.org> (raw)
$ 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
next reply other threads:[~2021-09-12 8:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-12 8:11 Stephane Chazelas [this message]
2021-09-12 17:43 ` Bart Schaefer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210912081151.k5cqsw6tdmkj7mi4@chazelas.org \
--to=stephane@chazelas.org \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).