Working with array keys (was Re: Parameter Expansion: Case Modification: ${var~} not documented)

2015-08-18 Thread Dan Douglas
On Tue, Aug 18, 2015 at 3:50 PM, Chet Ramey wrote: > On 8/18/15 1:43 PM, Dan Douglas wrote: >> On Tuesday, August 18, 2015 9:54:55 AM CDT Isaac Good wrote: >>> Would you mind sharing the rational behind having it undocumented? >> >> Since I like guessing: the syntax for parameter expansion operato

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Chet Ramey
On 8/18/15 1:43 PM, Dan Douglas wrote: > On Tuesday, August 18, 2015 9:54:55 AM CDT Isaac Good wrote: >> Would you mind sharing the rational behind having it undocumented? > > Since I like guessing: the syntax for parameter expansion operators is > currently non-extensible, so the namespace of te

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Dan Douglas
On Tuesday, August 18, 2015 9:54:55 AM CDT Isaac Good wrote: > Would you mind sharing the rational behind having it undocumented? Since I like guessing: the syntax for parameter expansion operators is currently non-extensible, so the namespace of terse operators is in limited supply. New syntax

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Isaac Good
Would you mind sharing the rational behind having it undocumented? On Tue, Aug 18, 2015 at 7:38 AM, Chet Ramey wrote: > On 8/18/15 9:50 AM, Dan Douglas wrote: > > >> Description: > >> The man page fails to document the ${var~} and ${var~~} case inversion > >> expansion. > >> It got the upper and

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Greg Wooledge
On Tue, Aug 18, 2015 at 09:22:07AM -0500, Dan Douglas wrote: > The `~` is obviously inspired by the vim > movement to toggle caps. ~ is standard vi, not a vim extension.

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Chet Ramey
On 8/18/15 9:50 AM, Dan Douglas wrote: >> Description: >> The man page fails to document the ${var~} and ${var~~} case inversion >> expansion. >> It got the upper and lower, ie ${var^} and ${var,} but not invert. >> >> Fix: >> More documentation. > > I'm pretty sure that's intentional. The corres

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Dan Douglas
On Tuesday, August 18, 2015 08:50:51 AM Dan Douglas wrote: > I'm pretty sure that's intentional. The corresponding `declare -c` has never > been documented either. > Hrm, it doesn't "correspond" actually. declare -c just capitalizes the first letter of the string. Another thing about the ${var

Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Isaac Good
Configuration Information [Automatically generated, do not change]: Machine: i686 OS: linux-gnu Compiler: gcc Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linux-gnu' -DCONF_VENDOR='pc' -DLOCALEDIR='/usr/share/ locale' -DPACKAGE

Re: Parameter Expansion: Case Modification: ${var~} not documented

2015-08-18 Thread Dan Douglas
On Monday, August 17, 2015 01:08:55 PM Isaac Good wrote: > Configuration Information [Automatically generated, do not change]: > Machine: i686 > OS: linux-gnu > Compiler: gcc > Compilation CFLAGS: -DPROGRAM='bash' -DCONF_HOSTTYPE='i686' > -DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i686-pc-linu