Re: [PATCH] Fix a problem that shadow `bind -x' does not work

2020-01-15 Thread Chet Ramey
On 12/18/19 4:01 AM, Koichi Murase wrote: Bash Version: 5.0 Patch Level: 11 Release Status: maint Description: When the key sequence of a binding is a prefix of other bindings (let me call it a shadow binding in this report), the shadow binding is triggered when the user input does no

Re: [PATCH] Fix a problem that shadow `bind -x' does not work

2020-01-15 Thread Chet Ramey
On 12/18/19 11:40 AM, Koichi Murase wrote: Test case 2: $ LANG=C bash --norc $ bind -x '"\C-t\C-t":echo hello' $ bind -x '"\C-t":echo world' $ <-- hello #<-- expected result is "world" I'm sorry. I found that "Test case 2" has not yet fixed in the previous patch. This is

Re: [PATCH] Fix a problem `rl_bind_key' cannot create shadow binding for `C-@'

2020-01-15 Thread Chet Ramey
On 12/18/19 11:43 AM, Koichi Murase wrote: Bash Version: 5.0 Patch Level: 11 Release Status: maint Description: One of the public interface of readline, the function `rl_bind_key (key, function)' does not work with key = 0 (C-@) when there are already bindings of keyseqs starting from

Re: trap: interactive bash exits on resending SIGINT twice

2020-01-15 Thread Chet Ramey
On 1/14/20 11:24 AM, Martijn Dekker wrote: Setting the following trap makes an interactive bash (any version) exit on issuing SIGINT: trap 'trap "true" INT; kill -s INT $$; trap - INT; kill -s INT $$' INT # ^^^ eat signal   ^^ unset trap After setting that trap, pre

temp setting POSIXLY_CORRECT turns alias expansion off

2020-01-15 Thread Martijn Dekker
When alias expansion is enabled for a script in bash native mode, prefixing POSIXLY_CORRECT=y to any command will turn alias expansion globally off. This is a bug because the assignment should only have effect on that command. $ bash -c 'shopt -s expand_aliases; shopt|grep expand_a; POSIXLY_