From f0fae838f811faed8d06ab08c5e671ba8f68821a Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:21:36 +0400 Subject: [PATCH 1/4] Added match '*.swp' to work with Vim in 'gitgnore'. --- .gitignore | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.gitignore b/.gitignore index 54166b9..83f1989 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,6 @@ # Editors .vscode/ + +# Vim +*.swp From d2c01dccd4fb326b5f03302db1913a5060f8acce Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:41:37 +0400 Subject: [PATCH 2/4] Fixed and improved SHORTCUTS module. Now it's 'SHORTCUTS and HISTORY'. --- languages/bash.sh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index 0fe147c..d738b2c 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -1,9 +1,8 @@ #!/bin/bash ############################################################################## -# SHORTCUTS +# SHORTCUTS and HISTORY ############################################################################## - CTRL+A # move to beginning of line CTRL+B # moves backward one character CTRL+C # halts the current command @@ -11,6 +10,7 @@ CTRL+D # deletes one character backward or logs out of current session, similar CTRL+E # moves to end of line CTRL+F # moves forward one character CTRL+G # aborts the current editing command and ring the terminal bell +CTRL+H # deletes one character under cursor (same as DELETE) CTRL+J # same as RETURN CTRL+K # deletes (kill) forward to end of line CTRL+L # clears screen and redisplay the line @@ -31,10 +31,17 @@ CTRL+Z # stops the current command, resume with fg in the foreground or bg in t ALT+B # moves backward one word ALT+D # deletes next word ALT+F # moves forward one word +ALT+H # deletes one character backward -DELETE # deletes one character backward -!! # repeats the last command -exit # logs out of current session +BACKSPACE # deletes one character backward +DELETE # deletes one character under cursor + +history # shows command line history +!! # repeats the last command +! # refers to command line 'n' +! # refers to command starting with 'string' + +exit # logs out of current session ############################################################################## From aa8b4efb860c9863ae8c117f53f600392ab6023e Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 11:52:27 +0400 Subject: [PATCH 3/4] Fixed tabs and spaces. --- languages/bash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index d738b2c..774ef51 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -10,7 +10,7 @@ CTRL+D # deletes one character backward or logs out of current session, similar CTRL+E # moves to end of line CTRL+F # moves forward one character CTRL+G # aborts the current editing command and ring the terminal bell -CTRL+H # deletes one character under cursor (same as DELETE) +CTRL+H # deletes one character under cursor (same as DELETE) CTRL+J # same as RETURN CTRL+K # deletes (kill) forward to end of line CTRL+L # clears screen and redisplay the line @@ -31,14 +31,14 @@ CTRL+Z # stops the current command, resume with fg in the foreground or bg in t ALT+B # moves backward one word ALT+D # deletes next word ALT+F # moves forward one word -ALT+H # deletes one character backward +ALT+H # deletes one character backward BACKSPACE # deletes one character backward DELETE # deletes one character under cursor history # shows command line history !! # repeats the last command -! # refers to command line 'n' +! # refers to command line 'n' ! # refers to command starting with 'string' exit # logs out of current session From 6fe0435c7777df8de98b5d9f3536820c6a39c431 Mon Sep 17 00:00:00 2001 From: Alexound Date: Thu, 24 Oct 2019 12:02:15 +0400 Subject: [PATCH 4/4] Keep working on 'bash' cheetsheet. Minor corrections. --- languages/bash.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index 774ef51..780e98c 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -54,7 +54,7 @@ echo $SHELL # displays the shell you're using echo $BASH_VERSION # displays bash version bash # if you want to use bash (type exit to go back to your previously opened shell) -whereis bash # finds out where bash is on your system +whereis bash # locates the binary, source and manual-page for a command which bash # finds out which program is executed as 'bash' (default: /bin/bash, can change across environments) clear # clears content on window (hide displayed lines)