Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: $var not expanded in ${x?$var}



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