Re: An array variable created by export/readonly builtins inside a function becomes a locale variable to that function unexpectedly

2015-11-30 Thread Greg Wooledge
On Sat, Nov 28, 2015 at 11:18:24AM +0800, ziyunfei wrote: > $ bash -c 'foo() { readonly a=(1);echo a=$a; }; foo; echo a=$a' # a becomes a > local variable > a=1 > a= "readonly" is a synonym for "declare -r", and declare (without the -g option) always marks variables as local when used in a functi

Re: An array variable created by export/readonly builtins inside a function becomes a locale variable to that function unexpectedly

2015-11-30 Thread konsolebox
On Mon, Nov 30, 2015 at 9:29 PM, Greg Wooledge wrote: > On Sat, Nov 28, 2015 at 11:18:24AM +0800, ziyunfei wrote: >> $ bash -c 'foo() { readonly a=(1);echo a=$a; }; foo; echo a=$a' # a becomes >> a local variable >> a=1 >> a= > > "readonly" is a synonym for "declare -r", and declare (without the

Re: bash 4.3.42 does not link on Solaris 2.4

2015-11-30 Thread Klaus Ziegler - owner of sunfreeware.de
On 26.11.15 18:03, Chet Ramey wrote: On 11/13/15 2:45 PM, Klaus Ziegler - owner of sunfreeware.de wrote: Configuration Information [Automatically generated, do not change]: Machine: sparc OS: solaris2.4 Compiler: cc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc' -DCONF_OSTYPE='sol

Re: prompt with \w incl. long UTF string messes up command line

2015-11-30 Thread Chet Ramey
On 11/25/15 3:33 AM, Ryo Furue wrote: > Bash Version: 4.3 > Patch Level: 42 > Release Status: release > > Description: > When PS1 includes \w and when \w contains long path including UTF > characters, the cursor position or the command line is messed up. > > Repeat-By: > 1. Source the attached s