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

Re: [PATCH] Document ${(!)refname}



> 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