Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $var not expanded in ${x?$var}
- X-seq: zsh-workers 52569
- 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: Wed, 21 Feb 2024 19:45:34 +0000
- Archived-at: <https://zsh.org/workers/52569>
- In-reply-to: <CAH+w=7YmczEa2rNa68OwUhiRArBFJ11FdwT6Qci_LmTAWFauGg@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> <20240220193911.avnmcqfliwltkj5m@chazelas.org> <CAH+w=7YmczEa2rNa68OwUhiRArBFJ11FdwT6Qci_LmTAWFauGg@mail.gmail.com>
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'}.
(could also be simplified to fputs(str, file) though I suspect
it makes no difference with modern compilers).
--
Stephane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author