I have a Debian 10.0 system. It has zsh 5.7.1 (x86_64-debian-linux-gnu). In ZSH 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
/
$ bindkey -l
.safe
command
emacs
isearch
main
vicmd
viins
viopp
visual
$ bindkey -M .safe | grep -E "/|undo"
$ bindkey -M command | grep -E "/|undo"
$ bindkey -M emacs | grep -E "/|undo"
"^X^U" undo
"^Xu" undo
"^_" undo
I also have a macOS Catalina 10.15.7 with zsh 5.7.1 (x86_64-apple-darwin19.0) and ctrl + / does not do anything there.