bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: currently doable? Indirect notation used w/a hash


From: Dan Douglas
Subject: Re: currently doable? Indirect notation used w/a hash
Date: Fri, 14 Jun 2013 06:36:33 -0500
User-agent: KMail/4.10.4 (Linux/3.9.4-pf+; KDE/4.10.4; x86_64; ; )

On Friday, June 14, 2013 02:30:19 PM Pierre Gaston wrote:
> On Fri, Jun 14, 2013 at 2:25 PM, Dan Douglas <ormaaj@gmail.com> wrote:
> > Also forgot to mention (though it should be obvious).
> >
> >  $ ~/doc/programs/bash43 -c 'function f { typeset -n x=$1; : "$x"; }; a=(yo 
> > jo); f "a[\$(echo yes this even applies to namerefs>&2)0]"'
> > yes this even applies to namerefs
> >
> > In a nutshell bash namerefs don't actually enable any new functionality. 
> > It's
> > just a convenient syntax, makes dealing with keys indirectly easier, and
> > improves portability in some limited cases.
> >
> Maybe nameref also allows to avoid name clashes (which I believe is
> not that easy to workaround now)?

It doesn't. https://gist.github.com/ormaaj/5682807

-- 
Dan Douglas



reply via email to

[Prev in Thread] Current Thread [Next in Thread]