Is there any way to undo edition of command in terminal? E.g. I have long string which I edited before running command, and I want to undo some of those edits before pressing ENTER.

link|improve this question

feedback

1 Answer

up vote 3 down vote accepted

If you activate vi or emacs mode (set -o emacs or set -o vi ) you can use many advanced features like 'undo'. The default is emacs mode, so ctrl-_ should already do an undo.

link|improve this answer
+1. as this is handled by bash's Readline facility, the OP might be interested in this answer that provides some of the basics of bash shortcuts: superuser.com/questions/113103/… .. another answer to that question provides this link for bash's vi mode: hypexr.org/bash_tutorial.php#vi – quack quixote Mar 4 '10 at 23:15
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.