Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $var not expanded in ${x?$var}
- X-seq: zsh-workers 52563
- From: Stephane Chazelas <stephane@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: $var not expanded in ${x?$var}
- Date: Tue, 20 Feb 2024 19:39:11 +0000
- Archived-at: <https://zsh.org/workers/52563>
- In-reply-to: <CAH+w=7ajhNqwmbc_V3scgXTKJ+7BJsii3r4=q+df84-MntxNng@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh workers <zsh-workers@xxxxxxx>
- References: <20230113080246.nghigc4givvaomve@chazelas.org> <836025199.2014747.1673889335246@mail.virginmedia.com> <20240220070505.fd6jfbcdldieqv7u@chazelas.org> <CAH+w=7ajhNqwmbc_V3scgXTKJ+7BJsii3r4=q+df84-MntxNng@mail.gmail.com>
2024-02-20 09:45:48 -0800, Bart Schaefer:
> On Mon, Feb 19, 2024 at 11:05 PM Stephane Chazelas
> <stephane@xxxxxxxxxxxx> wrote:
[...]
> > That transformation of newline into \n and other nicezputs'ness
> > seems undesirable to me though.
>
> It's probably worthwhile for utils.c:zerrmsg() to have a %-placeholder
> that means a literal string. Not hard to do, just need to choose a
> letter. %S ?
That was my thought as well with %S or %#s (alternative form of
%s) or %r (raw). But then I thought maybe there was already
something available to print some raw error.
Looking at https://austingroupbugs.net/view.php?id=1771 where
availability of printf %X directives is discussed, looks like %S
is the least likely to conflict with printf(3) or printf(1) if
that was ever to be a concern.
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author