From 6273401328dc4040d2e308ae9623a7c033a982e8 Mon Sep 17 00:00:00 2001 From: Colas Date: Wed, 17 Jun 2015 18:31:30 +0200 Subject: [PATCH 1/4] Added "ctrl-l" command that I use everyday --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5840e2f..d035772 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,8 @@ Scope: - In Bash, use **ctrl-r** to search through command history. +- In Bash, use **ctrl-l** to clear the screen. + - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. - To go back to the previous working directory: `cd -` From 4bafc6d011b5e6330f2a2fbf2025f56b3d8def44 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 17 Jun 2015 09:54:33 -0700 Subject: [PATCH 2/4] Brevity for #58 --- README.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/README.md b/README.md index d035772..47772a4 100644 --- a/README.md +++ b/README.md @@ -55,9 +55,7 @@ Scope: - In Bash, use **ctrl-r** to search through command history. -- In Bash, use **ctrl-l** to clear the screen. - -- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, and **ctrl-k** to kill to the end of the line. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. +- In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. - To go back to the previous working directory: `cd -` From adeff6dafc725028951ee4fa5e31852d3952f012 Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 17 Jun 2015 10:42:26 -0700 Subject: [PATCH 3/4] Clarify philosophy. Mention tab. Fixes #59. --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 47772a4..0f3249f 100644 --- a/README.md +++ b/README.md @@ -18,14 +18,14 @@ Much of this [originally](http://www.quora.com/What-are-some-lesser-known-but-useful-Unix-commands) [appeared](http://www.quora.com/What-are-the-most-useful-Swiss-army-knife-one-liners-on-Unix) on [Quora](http://www.quora.com/What-are-some-time-saving-tips-that-every-Linux-user-should-know), -but given the interest there, it seems it's worth using Github, where people more talented than I can readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! +but given the interest there, it seems it's worth using Github, where people more talented than I can readily suggest improvements. If you see an error or something that could be better, please submit an issue or PR! (But only after reviewing the scope/philosophy bullets below.) Scope: -- The goals are breadth and brevity. Every tip is essential in some situation or significantly saves time over alternatives. +- The goals are breadth (everything important), specificity (give concrete examples of the most common case), and brevity (avoid things that aren't essential or digressions you can easily look up elsewhere). Every tip is essential in some situation or significantly saves time over alternatives. - This is written for Linux. Many but not all items apply equally to MacOS (or even Cygwin). - The focus is on interactive Bash, though many tips apply to other shells and to general Bash scripting. -- Descriptions are intentionally minimal, with the expectation you'll use `man`, `apt-get`/`yum`/`dnf` to install, and Google for more background. +- To keep this to one page, include content by reference whenever possible. Descriptions are intentionally minimal, with the expectation you'll use `man`, `apt-get`/`yum`/`dnf` to install, and Google for more background. ## Basics @@ -53,7 +53,7 @@ Scope: ## Everyday use -- In Bash, use **ctrl-r** to search through command history. +- In Bash, use **Tab** to complete file names and **ctrl-r** to search through command history. - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob. From 06773e4bf86859900d0681763f645b5d42facd5f Mon Sep 17 00:00:00 2001 From: Joshua Levy Date: Wed, 17 Jun 2015 10:45:42 -0700 Subject: [PATCH 4/4] Fix to tab note #59. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0f3249f..4edd958 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Scope: ## Everyday use -- In Bash, use **Tab** to complete file names and **ctrl-r** to search through command history. +- In Bash, use **Tab** to complete arguments and **ctrl-r** to search through command history. - In Bash, use **ctrl-w** to delete the last word, and **ctrl-u** to delete the whole line. Use **alt-b** and **alt-f** to move by word, **ctrl-k** to kill to the end of the line, **ctrl-l** to clear the screen. See `man readline` for all the default keybindings in Bash. There are a lot. For example **alt-.** cycles through previous arguments, and **alt-*** expands a glob.