Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion)

2019-12-12 Thread Eli Schwartz
On 12/12/19 9:57 PM, L A Walsh wrote: > > > On 2019/12/12 13:01, Ilkka Virta wrote: >> On 12.12. 21:43, L A Walsh wrote: >>   >>> On 2019/12/06 14:14, Chet Ramey wrote: >>> >>> Seems very hard to print out that backquote though.  Closest I got >>> was bash converting it to "''": >>>     >> >>

Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion)

2019-12-12 Thread L A Walsh
On 2019/12/12 13:01, Ilkka Virta wrote: On 12.12. 21:43, L A Walsh wrote: On 2019/12/06 14:14, Chet Ramey wrote: Seems very hard to print out that backquote though. Closest I got was bash converting it to "''": The backquote is in [6], and the backslash disappears, you just get

Re: Two states of empty arrays

2019-12-12 Thread Martin Schulte
Hello Léa! Léa Gris wrote: > I was trying to play the the -v test to detect when an array or > associative array has been declared, not necessarily assigned entries > key, values, to not error when Bash runs with -o nounset Just for the curious: What is your attention here? I think that most

Re: Two states of empty arrays

2019-12-12 Thread Léa Gris
Le 12/12/2019 à 20:13, Chet Ramey écrivait : >> # Empty array declared without parenthesis >> unset myArr >> declare -a myArr >> typeset -p myArr >> echo "${#myArr[@]}" > > This is an unset variable with the array attribute; you have not assigned a > value. >> # Empty array declared without

Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion)

2019-12-12 Thread Ilkka Virta
On 12.12. 21:43, L A Walsh wrote: On 2019/12/06 14:14, Chet Ramey wrote: Seems very hard to print out that backquote though.  Closest I got was bash converting it to "''": The backquote is in [6], and the backslash disappears, you just get the pair of quotes in [2] because that's how printf

Re: Binding Containing Escape Key Fails to Escape History Search

2019-12-12 Thread Chet Ramey
On 12/8/19 7:15 PM, sunnycemet...@gmail.com wrote: On 2019-11-04 14:41, Chet Ramey wrote: If \ef and Alt+f generate distinct character sequences, you can bind them separately. If they don't, you can't. This has nothing to do with whether or not incremental searching expands keyboard macros.

Re: Not missing, but very hard to see (was Re: Backslash missing in brace expansion)

2019-12-12 Thread Greg Wooledge
On Thu, Dec 12, 2019 at 11:43:58AM -0800, L A Walsh wrote: > > read -r -a a< <(printf "%q " {Z..a}) > > my -p a > declare -a a=([0]="Z" [1]="\\[" [2]="''" [3]="\\]" [4]="\\^" [5]="_" > [6]="\\\`" [7]="a") Nice try. I guess the takeaway from this thread is: "You cannot mix capital and lowercase

Not missing, but very hard to see (was Re: Backslash missing in brace expansion)

2019-12-12 Thread L A Walsh
On 2019/12/06 14:14, Chet Ramey wrote: Seems very hard to print out that backquote though. Closest I got was bash converting it to "''": read -r -a a< <(printf "%q " {Z..a}) my -p a declare -a a=([0]="Z" [1]="\\[" [2]="''" [3]="\\]" [4]="\\^" [5]="_" [6]="\\\`" [7]="a") #2 is where

Re: Two states of empty arrays

2019-12-12 Thread Chet Ramey
On 12/12/19 12:08 PM, Léa Gris wrote: Hello, Depending on how an empty array is declared, it is not stored with the same state. # Empty array declared without parenthesis unset myArr declare -a myArr typeset -p myArr echo "${#myArr[@]}" This is an unset variable with the array attribute; you

Re: Two states of empty arrays

2019-12-12 Thread Clint Hepner
On Thu, Dec 12, 2019 at 1:10 PM Léa Gris wrote: > Hello, > > Depending on how an empty array is declared, it is not stored with the > same state. > > # Empty array declared without parenthesis > unset myArr > declare -a myArr > typeset -p myArr > echo "${#myArr[@]}" > > output: > declare -a

Two states of empty arrays

2019-12-12 Thread Léa Gris
Hello, Depending on how an empty array is declared, it is not stored with the same state. # Empty array declared without parenthesis unset myArr declare -a myArr typeset -p myArr echo "${#myArr[@]}" output: declare -a myArr 0 # Empty array declared without parenthesis unset myArr declare -a

Two states of empty arryays

2019-12-12 Thread Léa Gris
Hello, Depending on how an empty array is declared, it is not stored with the same state. # Empty array declared without parenthesis unset myArr declare -a myArr typeset -p myArr echo "${#myArr[@]}" output: declare -a myArr 0 # Empty array declared without parenthesis unset myArr declare -a

parser perversities (was Re: make install failed; dump core in mkdir)

2019-12-12 Thread L A Walsh
On 2019/12/02 07:04, pepa65 wrote: it would be nice to be able to omit 'do'. like: set -- 1 2 3 for i { echo $i } 1 2 3 or: for i;{ echo $i;} 1 2 3

Re: bind -X shows inactive bindings (bindings removed using bind -r)

2019-12-12 Thread Koichi Murase
> according to `bind --help`, `bind -X` should "List key sequences bound with > -x and associated commands in a form that can be reused as input.". > > However, when I remove a binding using `bind -r` it still shows up in the > list. > > Simon Let I also would like to see this problem fixed. In

bind -X shows inactive bindings (bindings removed using bind -r)

2019-12-12 Thread Šimon Let
Hi, according to `bind --help`, `bind -X` should "List key sequences bound with -x and associated commands in a form that can be reused as input.". However, when I remove a binding using `bind -r` it still shows up in the list. Reproduce: 1) Bind command using: `bind -x "\"\C-r\":\"echo I just