Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $var not expanded in ${x?$var}
- X-seq: zsh-workers 52561
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: $var not expanded in ${x?$var}
- Date: Tue, 20 Feb 2024 09:45:48 -0800
- Archived-at: <https://zsh.org/workers/52561>
- In-reply-to: <20240220070505.fd6jfbcdldieqv7u@chazelas.org>
- List-id: <zsh-workers.zsh.org>
- References: <20230113080246.nghigc4givvaomve@chazelas.org> <836025199.2014747.1673889335246@mail.virginmedia.com> <20240220070505.fd6jfbcdldieqv7u@chazelas.org>
On Mon, Feb 19, 2024 at 11:05 PM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
>
> $ echo ${1?$'a\nb'}
> zsh: 1: a\nb
> $ print -Prv err '%F{red}BAD%f'
> $ a=${1?$err}
> zsh: 1: ^[[31mBAD^[[39m
>
> 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 ?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author