From c6fca515b64f4ca270ad3f9e5b213ebbb6d1075a Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Wed, 19 Apr 2017 13:29:59 -0500 Subject: [PATCH] Add Undo Some Command Line Editing as a unix til --- README.md | 3 ++- unix/undo-some-command-line-editing.md | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) create mode 100644 unix/undo-some-command-line-editing.md diff --git a/README.md b/README.md index df3236e..83de7ac 100644 --- a/README.md +++ b/README.md @@ -10,7 +10,7 @@ smart people at [Hashrocket](http://hashrocket.com/). For a steady stream of TILs from a variety of rocketeers, checkout [til.hashrocket.com](https://til.hashrocket.com/). -_525 TILs and counting..._ +_526 TILs and counting..._ --- @@ -497,6 +497,7 @@ _525 TILs and counting..._ - [SSH With Port Forwarding](unix/ssh-with-port-forwarding.md) - [Sort In Numerical Order](unix/sort-in-numerical-order.md) - [Switch Versions of a Brew Formula](unix/switch-versions-of-a-brew-formula.md) +- [Undo Some Command Line Editing](unix/undo-some-command-line-editing.md) - [View A Web Page In The Terminal](unix/view-a-web-page-in-the-terminal.md) - [Watch The Difference](unix/watch-the-difference.md) - [Watch This Run Repeatedly](unix/watch-this-run-repeatedly.md) diff --git a/unix/undo-some-command-line-editing.md b/unix/undo-some-command-line-editing.md new file mode 100644 index 0000000..d6ac824 --- /dev/null +++ b/unix/undo-some-command-line-editing.md @@ -0,0 +1,12 @@ +# Undo Some Command Line Editing + +When using some of the fancy command line editing shortcuts, such as +`ctrl-u`, you may end up erroneously changing or deleting part of the +current command. Retyping it may be a pain or impossible if you've forget +exactly what was changed. Fortunately, bash's command line editing has undo +built in. Just hit `ctrl-_` a couple times to get back to where you want to +be. + +h/t Chris Erin + +[source](https://www.gnu.org/software/bash/manual/bashref.html#Command-Line-Editing)