Typo in bash.1.gz for description of menu-complete-backward

2011-06-29 Thread d-ulrick
Configuration Information [Automatically generated, do not change]: Machine: i386 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' -DCONF_VENDOR='redhat' -DLOCALEDIR='/usr/share/locale' -DPAC

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Mart Frauenlob
On 29.06.2011 18:31, Maarten Billemont wrote: On 29 Jun 2011, at 14:05, Mart Frauenlob wrote: On 29.06.2011 13:42, Maarten Billemont wrote: On 27 Jun 2011, at 16:25, Chet Ramey wrote: [...] Exactly, let's draw the array in the example: arr=(a b c) values: [ a | b | c ] indexes: 0 1 2

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Maarten Billemont
On 29 Jun 2011, at 15:01, Greg Wooledge wrote: > > On Wed, Jun 29, 2011 at 01:42:06PM +0200, Maarten Billemont wrote: >> If you expand ${arr[@]:1:2}, you get the following: >> values: [ a | b | c ] >> indexes: 0 1 2 3 >> expand: [ 1 2 ] => b c >>^ start from 1 >>

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Maarten Billemont
On 29 Jun 2011, at 14:05, Mart Frauenlob wrote: > > On 29.06.2011 13:42, Maarten Billemont wrote: >> On 27 Jun 2011, at 16:25, Chet Ramey wrote: >>> > [...] >> Exactly, let's draw the array in the example: >> >> arr=(a b c) >> values: [ a | b | c ] >> indexes: 0 1 2 3 >> > [...] > > 4 m

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Greg Wooledge
On Wed, Jun 29, 2011 at 01:42:06PM +0200, Maarten Billemont wrote: > If you expand ${arr[@]:1:2}, you get the following: > values: [ a | b | c ] > indexes: 0 1 2 3 > expand: [ 1 2 ] => b c > ^ start from 1 > ^ length 2 > > I propose we let a negative len

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Mart Frauenlob
On 29.06.2011 13:42, Maarten Billemont wrote: On 27 Jun 2011, at 16:25, Chet Ramey wrote: [...] Exactly, let's draw the array in the example: arr=(a b c) values: [ a | b | c ] indexes: 0 1 2 3 [...] 4 members? $ arr=(a b c) $ for x in 0 1 2 3; do printf "<%s>\n" "${arr[x]}"; done

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Maarten Billemont
> Since ${arr[-1]} already does exactly this, I figure it would merely add to > the syntax' consistency. Consider the fact that ${arr[x]} is in fact the equivalent of ${arr[@]:x:1}.

Re: Negative indexes in ${arr[@]:off:length}

2011-06-29 Thread Maarten Billemont
On 27 Jun 2011, at 16:25, Chet Ramey wrote: > >> I don't even understand what the second one is supposed to mean at >> all -- the :1: means to start with "b" and the -2 means to go back 2 >> elements...? How do you derive "a c" from any possible interpretation >> of this? > > I assume that he wa