I hadn’t yet researched whether or not bracketed paste mode is supported by the version of Bash/Readline on my Ubuntu 16.04 system (it isn’t) and out of curiosity, I ran the following command presented in this Ask Ubuntu answer.
bind 'set-enable-bracketed-paste off'
set-enable-bracketed-paste setting didn’t exist, I’d expect
bind to either complain about bad syntax or to do nothing. Instead, it unbound the lower case
p, i.e., the character disappears into a black hole when typed.
It seems that this usage of the
bind command unbinds the character that immediately follows the last hyphen before the first space character (if there’s any space in the string). E.g., I ran the following commands:
This results in the
r character being unbound:
bind '__-r anymorecharacters'
This unbinds the character,
The characters can still be entered by typing Ctrl-V before entering the character, thus allowing them to be re-bound:
bind 'r: self-insert' bind '2: self-insert'
To me, this is unexpected and surprising behaviour and I’d consider it to be a bug. However, I’m not very familiar with Readline so I thought I’d ask here to check if there’s a reasonable explanation for this behaviour.