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

2013-06-14 Thread Chris Down
On 14 Jun 2013 00:57, "Linda Walsh" wrote: > > > > Chet Ramey wrote: >>> >>> Now I want to access the value for IP for the current "IF" (IF holding >>> eth0 or eth1 or some other InterFace name). >> >> >> This is an excellent statement of the rationale for nameref variables, >> which will be imple

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

2013-06-14 Thread Linda Walsh
Chris Down wrote: Chet Ramey wrote: >> Now I want to access the value for IP for the current "IF" (IF holding >> eth0 or eth1 or some other InterFace name). > This is an excellent statement of the rationale for nameref variables, > which will be implemented in bash-4.3. That or

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

2013-06-14 Thread Chris Down
On 14 Jun 2013 10:21, "Linda Walsh" wrote: >> Please, no more brittle export hacks. I'm already crying enough at function exports. > > > Brittle would be bad. Pliant and chewy would be much better, I agree. > > Perhaps you might explain what you mean by brittle? Like the export hacks > you get i

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

2013-06-14 Thread Dan Douglas
On Monday, June 10, 2013 09:39:56 AM Greg Wooledge wrote: > > On 10 Jun 2013 14:15, "Chris F.A. Johnson" wrote: > > >It is not the least bit difficult with eval: > > > > > > eval "array=( \"\${$1[@]}\" )" > > On Mon, Jun 10, 2013 at 09:17:23PM +0800, Chris Down wrote: > > Enjoy your arbitrary

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

2013-06-14 Thread Dan Douglas
On Friday, June 14, 2013 06:02:15 AM Dan Douglas wrote: > On Monday, June 10, 2013 09:39:56 AM Greg Wooledge wrote: > > > On 10 Jun 2013 14:15, "Chris F.A. Johnson" wrote: > > > >It is not the least bit difficult with eval: > > > > > > > > eval "array=( \"\${$1[@]}\" )" > > > > On Mon, Jun 10

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

2013-06-14 Thread Pierre Gaston
On Fri, Jun 14, 2013 at 2:25 PM, Dan Douglas wrote: > On Friday, June 14, 2013 06:02:15 AM Dan Douglas wrote: >> On Monday, June 10, 2013 09:39:56 AM Greg Wooledge wrote: >> > > On 10 Jun 2013 14:15, "Chris F.A. Johnson" wrote: >> > > >It is not the least bit difficult with eval: >> > > > >>

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

2013-06-14 Thread Dan Douglas
On Friday, June 14, 2013 02:30:19 PM Pierre Gaston wrote: > On Fri, Jun 14, 2013 at 2:25 PM, Dan Douglas 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

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-14 Thread Greg Wooledge
On Thu, Jun 13, 2013 at 04:42:36PM -0700, Linda Walsh wrote: > Chris F.A. Johnson wrote: > > The baskspaces (\b) are erasing your input, not the function's > > output. That's incorrect. A backspace character sent to a terminal device moves the cursor (or does whatever else the terminal choose

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

2013-06-14 Thread Greg Wooledge
On Fri, Jun 14, 2013 at 06:25:12AM -0500, Dan Douglas 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 N

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-14 Thread Dave Gibson
Linda Walsh wrote: > > I have a small function in my bashrc: > > function showsize () {\ > local s=$(stty size); local o="(${s% *}x${s#* })"; s="${#o}";\ > echo -n $o; while ((s-- > 0));do echo -ne "\b"; done; \ > } > export -f showsize > trap showsize SIGWINCH > --- > That has the effect of

Re: corrupted input after size function (input that's not recorded by bash)

2013-06-14 Thread Linda Walsh
Greg Wooledge wrote: This makes me continue to suspect that the problem is being triggered by something else in your setup (possibly multiple things working together). You might try to reproduce the problem in a simpler setup, to see if you can isolate what factors must be present for it to o

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

2013-06-14 Thread Linda Walsh
Chris Down wrote: On 14 Jun 2013 10:21, "Linda Walsh" wrote: Please, no more brittle export hacks. I'm already crying enough at function exports. Brittle would be bad. Pliant and chewy would be much better, I agree. Perhaps you might explain what you mean by brittle? Like the export hac