Bash/zsh: Undo erase backwards (ctrl+w)
Undo it's like this : ctrl + _
This below shortcut key does the job of undo the erased string by ctrl+w,
ctrl+y
It's ctrl
+ /
ctrl
+ y
pastes what's in the buffer, the buffer get's filled by things like ctrl
+ w
, you can paste it in different places multiple times, so it's not an "undo". ctrl
+ /
does undo every action, you can hit ctrl
+ /
multiple times to undo every action.