I have a Debian 10.0 system. It has GNU bash, version 5.0.3(1)-release (x86_64-pc-linux-gnu). In Bash prompt, I type
foo bar baz
Then I type alt + backspace two times. The words baz
and bar
get deleted and only foo
remains.
Then I type ctrl + / two times to undo the deletions. The words baz
and bar
reappear.
How is ctrl + / working as the undo command? I don't see it defined anywhere?
$ echo / | grep -E "/|undo" # just testing my regex
/
$ bind -p | grep -E '/|undo'
"\e/": complete-filename
"\C-x/": possible-filename-completions
"/": self-insert
"\C-x\C-u": undo
"\C-_": undo
^_
? – Kamil Maciorowski Jan 15 '21 at 20:13"\C-_": undo
applies. Although I cannot tell why Ctrl+/ keystroke generates Ctrl+_, therefore it's only a comment, not an answer. – Kamil Maciorowski Jan 15 '21 at 20:19