Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] Document ${(!)refname}
- X-seq: zsh-workers 51910
- From: Jun T <takimoto-j@xxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH] Document ${(!)refname}
- Date: Fri, 7 Jul 2023 15:45:29 +0900
- Archived-at: <https://zsh.org/workers/51910>
- In-reply-to: <CAH+w=7bc+WNg+3=9e6koaQFwut+yWWa3ZCg4-HqKnYXm+X0iEA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7bc+WNg+3=9e6koaQFwut+yWWa3ZCg4-HqKnYXm+X0iEA@mail.gmail.com>
> 2023/06/23 6:39、Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>のメール:
>
> This documents workers/51509.
(snip)
> +item(tt(!))(
> +When the parameter being expanded is a named reference, the reference
> +string is substituted and thus the reference is em(not) resolved.
% typeset -n ptr=var
% echo $(\!t)ptr}
nameref
In this case "the reference string is substituted" seems to be not so
suitable. The flag ! always indicates
"the named reference itself, not its referent".
Probably something like the following,
"When the parameter being expanded is a named reference, do not
resolve to its referent but use its own value."
but not sure this is clear enough.
At the end of the subsection "Named References" in zshexpn(1)
(expn.yo:1614), there is a description of ${(t)ptr}.
How about adding a description of $(!t)ptr} here?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author