tags:

views:

132

answers:

2

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?

+2  A: 

You're misunderstanding. They're talking about undoing changes to the command-line, before you press enter, not undoing the results of a command.

Matthew Flaschen
+4  A: 

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.

sykora
Thank you for the explanation!
Masi