Re: Print non-readonly variables with declare +r -p

2011-12-15 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/14/11 4:10 PM, Dan Douglas wrote: > Ah. I had assumed the single quotes added around array compound asssignment > broke this (intentionally?), but now I see it's valid. I expected declare -a > y='([0]="a" [1]="b c" [2]="d")' to set the first e

Re: Print non-readonly variables with declare +r -p

2011-12-14 Thread Dan Douglas
On Wednesday, December 14, 2011 10:57:21 AM Chet Ramey wrote: > On 12/13/11 3:13 PM, Dan Douglas wrote: > > I imagine this is ok because Bash's declare -p is intended to be human- > > readable only, whereas Ksh guarantees -p produces output in a format > > reusable as input. > > Bash's `declare -p

Re: Print non-readonly variables with declare +r -p

2011-12-14 Thread Chet Ramey
On 12/13/11 3:13 PM, Dan Douglas wrote: > I imagine this is ok because Bash's declare -p is intended to be human- > readable only, whereas Ksh guarantees -p produces output in a format reusable > as input. Bash's `declare -p' output is intended to be reusable as input, though the documentation d

Re: Print non-readonly variables with declare +r -p

2011-12-13 Thread Dan Douglas
On Tuesday, December 13, 2011 12:14:41 PM lhun...@mbillemo.lin-k.net wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i386 > OS: darwin11.2.0 > Compiler: /Developer/usr/bin/clang > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' > -DCONF_OSTYPE='d