Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $var not expanded in ${x?$var}
On Wed, Feb 21, 2024 at 11:45 AM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
>
> 2024-02-20 20:44:47 -0800, Bart Schaefer:
> [...]
> > + case 'S':
> > + str = va_arg(ap, const char *);
> > + fprintf(file, "%s", str);
> > + break;
> [...]
>
> I suspect there's something wrong with that as it could not
> possibly work for ${var?$'\0'}.
What would you expect it to do? You can't have it both raw and not
raw. With the patch applied:
% : ${var?$'\0oopsie'}
zsh: var: ? oopsie
Might try running that through valgrind later, not presently on a
machine that has valgrind.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author