Search code examples
zshundorm

Unable to undo removal in Zsh


I run at path/test

rm -r *

The tutorial says that I can undo the change by

If one of these fancyeditor commands changes your command line in a way you did not intend, you can undo changes withˆ_,ifyou can get it out of your keyboard, orˆXˆU,otherwise.

However, I did not get the files back by pressing Ctrl-x Ctrl-u or Ctrl-x-u. I also tried ^_ unsuccessfully by pressing Shift-6 Shift-- or Shift-6--.

How can you undo the removal in Zsh?


Solution

  • The undo ability is a feature of the Z Line Editor, the editor that you use while typing at the command line. It lets you undo things you type on the command line, like any good text editor. But it won't let you undo commands that you execute.