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

Re: [PATCH] Enable further expansion of parameter name by ${!...}



On Sun, Jan 25, 2015 at 7:14 PM, Peter Stephenson
<p.w.stephenson@xxxxxxxxxxxx> wrote:
> On Sun, 25 Jan 2015 04:15:38 -0500
> Tomoki Sekiyama <tomoki.sekiyama@xxxxxxxxx> wrote:
>> With this change, ${!...} will enable further expansion of parameter name,
>> which is equivalent to (P) expansion flag. This will enable zsh to run some
>> scripts using variable references for bash.
>
> Thanks, this is a useeful idea, however it looks like a bit more work
> will be necessary to avoid this being confused with the parameter called
> "!", i.e. the last programme run in the background.  Both $! and ${!}
> have that meaning.

IIRC, in bash, you can also use ${!foo} even with banghist active. We
probably don't want to replicate that feature, but make sure ${\!foo}
works I suppose?

-- 
Mikael Magnusson



Messages sorted by: Reverse Date, Date, Thread, Author