From 0138f8d033cae3845a2d2c0f26f927478bf430ce Mon Sep 17 00:00:00 2001 From: Shubham Bhattar Date: Mon, 16 Apr 2018 23:27:33 +0530 Subject: [PATCH] Ctrl-U + Ctrl-Y when you want to change command midway of tying it. Previously, it was described here to use **ctrl-a** to go to the start of the line, enter a **#** and then press enter so that it will be a comment instead of a command. But AFAIK, the **ctrl-u** + **ctrl-y** method is more popular. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 781d61e..355e89e 100755 --- a/README.md +++ b/README.md @@ -93,7 +93,7 @@ Notes: - To go back to the previous working directory: `cd -`. -- If you are halfway through typing a command but change your mind, hit **alt-#** to add a `#` at the beginning and enter it as a comment (or use **ctrl-a**, **#**, **enter**). You can then return to it later via command history. +- If you are halfway through typing a long command but you suddenly remember that you need to run another command before this command, hit **ctrl-u**. This will the cut the part from the beginning of the line to the cursor. This will stay in your clipboard and then you can paste it when required using **ctrl-y**. - Use `xargs` (or `parallel`). It's very powerful. Note you can control how many items execute per line (`-L`) as well as parallelism (`-P`). If you're not sure if it'll do the right thing, use `xargs echo` first. Also, `-I{}` is handy. Examples: ```bash