-
-
Save fengjing/7509a05d34362338499cea6554ad2db7 to your computer and use it in GitHub Desktop.
Revisions
-
tuxfight3r revised this gist
May 12, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -31,7 +31,7 @@ Bash Shortcuts | ctrl + i | command completion like Tab | ctrl + l | Clear the screen (same as clear command) | | ctrl + c | kill whatever is running | | ctrl + d | Exit shell (same as exit command when cursor line is empty) | | ctrl + z | Place current process in background | | ctrl + _ | Undo | | ctrl + x ctrl + u | Undo the last changes. ctrl+ _ does the same | -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 8 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -23,36 +23,36 @@ Bash Shortcuts |----------|--------------------------------| | ctrl + d | Delete the character under the cursor | | ctrl + h | Delete the previous character before cursor | | ctrl + u | Clear all / cut BEFORE cursor | | ctrl + k | Clear all / cut AFTER cursor | | ctrl + w | delete the word BEFORE the cursor | | alt + d | delete the word FROM the cursor | | ctrl + y | paste (if you used a previous command to delete) | | ctrl + i | command completion like Tab | ctrl + l | Clear the screen (same as clear command) | | ctrl + c | kill whatever is running | | ctrl + d | Exit shell (same as exit command) | | ctrl + z | Place current process in background | | ctrl + _ | Undo | | ctrl + x ctrl + u | Undo the last changes. ctrl+ _ does the same | | ctrl + t | Swap the last two characters before the cursor | | esc + t | Swap last two words before the cursor | | alt + t | swap current word with previous | | esc + . | | | esc + _ | | | alt + [Backspace] | delete PREVIOUS word | | alt + < | Move to the first line in the history | | alt + > | Move to the end of the input history, i.e., the line currently being entered | | alt + ? | display the file/folder names in the current path as help | | alt + * | print all the file/folder names in the current path as parameter | | alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") | | alt + c | capitalize the first character to end of word starting at cursor (whole word if cursor is at the beginning of word)| | alt + u | make uppercase from cursor to end of word | | alt + l | make lowercase from cursor to end of word | | alt + n | | | alt + p | Non-incremental reverse search of history. | | alt + r |Undo all changes to the line| | alt + ctl + e |Expand command line. | | ~[TAB][TAB] | List all users | | $[TAB][TAB] | List all system variables | | @[TAB][TAB] | List all entries in your /etc/hosts file | -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -45,7 +45,7 @@ Bash Shortcuts | alt + ? | | | alt + * | | | alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") | | alt + c | capitalize the first character to end of word starting at cursor (whole word if cursor is at the beginning of word)| | alt + l | | | alt + n | | | alt + p | Non-incremental reverse search of history. | -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -94,3 +94,4 @@ kill %1 ## References 1. http://cnswww.cns.cwru.edu/php/chet/readline/readline.html 2. https://github.com/fliptheweb/bash-shortcuts-cheat-sheet/blob/master/README.md -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,5 @@ Bash Shortcuts ==============  -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -13,10 +13,11 @@ Bash | ctrl + f | move forward one character | | alt + f | move cursor FORWARD one word | | alt + b | move cursor BACK one word | | ctrl + xx | Toggle between the start of line and current cursor position | | ctrl + ] + x | Where x is any character, moves the cursor forward to the next occurance of x | | alt + ctrl + ] + x | Where x is any character, moves the cursor backwards to the previous occurance of x | ## Edit / Other | command | description | |----------|--------------------------------| -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ Bash ====  ## Moving -
tuxfight3r revised this gist
Mar 2, 2021 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,8 @@ Bash ====  ## Moving | command | description | -
tuxfight3r revised this gist
Feb 1, 2021 . 1 changed file with 3 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -24,14 +24,15 @@ Bash | ctrl + k | Clear all AFTER cursor | | ctrl + w | delete the word BEFORE the cursor | | alt + d | delete the word FROM the cursor | | ctrl + i | command completion like Tab | ctrl + l | Clear the screen (same as clear command) | | ctrl + c | kill whatever is running | | ctrl + d | Exit shell (same as exit command) | | ctrl + y | paste (if you used a previous command to delete) | | ctrl + z | Place current process in background | | ctrl + _ | Undo | | ctrl + x ctrl + u | Undo the last changes. ctrl+ _ does the same | | ctrl + t | Swap the last two characters before the cursor | | esc + t | Swap last two words before the cursor | | esc + . | | | esc + _ | | -
tuxfight3r revised this gist
Nov 18, 2020 . 1 changed file with 0 additions and 27 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,27 +0,0 @@ -
tuxfight3r revised this gist
Nov 18, 2020 . 1 changed file with 14 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,8 +11,8 @@ Bash | ctrl + f | move forward one character | | alt + f | move cursor FORWARD one word | | alt + b | move cursor BACK one word | | ctrl + ] + x | Where x is any character, moves the cursor forward to the next occurance of x | | alt + ctrl + ] + x | Where x is any character, moves the cursor backwards to the previous occurance of x | ## Other @@ -31,6 +31,7 @@ Bash | ctrl + y | paste (if you used a previous command to delete) | | ctrl + z | Place current process in background | | ctrl + _ | undo | | ctrl + x ctrl + u | Undo the last changes. ctrl+ _ does the same | | esc + t | Swap last two words before the cursor | | esc + . | | | esc + _ | | @@ -43,19 +44,19 @@ Bash | alt + c | | | alt + l | | | alt + n | | | alt + p | Non-incremental reverse search of history. | | alt + r |Undo all changes to the line| | alt + ctl + e |Expand command line. | | alt + t | | | alt + u | | | ~[TAB][TAB] | List all users | | $[TAB][TAB] | List all system variables | | @[TAB][TAB] | List all entries in your /etc/hosts file | | [TAB] | Auto complete | | cd - | change to PREVIOUS working directory | ## History | command | description | |----------|--------------------------------| | ctrl + r | Search backward starting at the current line and moving 'up' through the history as necessary | @@ -64,6 +65,13 @@ Bash | ctrl + n | Fetch the next command from the history list, moving forward in the list (same as down arrow) | | ctrl + o | Execute the command found via Ctrl+r or Ctrl+s | | ctrl + g | Escape from history searching mode | | !! | Run PREVIOUS command (ie `sudo !!`) | | !vi | Run PREVIOUS command that BEGINS with vi | | !vi:p | Print previously run command that BEGINS with vi | | !n | Execute nth command in history | | !$ | Last argument of last command | | !^ | First argument of last command | | ^abc^xyz | Replace first occurance of abc with xyz in last command and execute it | # Kill a job -
tuxfight3r revised this gist
Nov 18, 2020 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,6 +11,8 @@ Bash | ctrl + f | move forward one character | | alt + f | move cursor FORWARD one word | | alt + b | move cursor BACK one word | | ctrl-] + x | Where x is any character, moves the cursor forward to the next occurance of x | | alt-ctrl-] + x | Where x is any character, moves the cursor backwards to the previous occurance of x | ## Other -
tuxfight3r revised this gist
Nov 18, 2020 . 1 changed file with 15 additions and 8 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -17,16 +17,14 @@ Bash | command | description | |----------|--------------------------------| | ctrl + d | Delete the character under the cursor | | ctrl + h | Delete the previous character before cursor | | ctrl + u | Clear all BEFORE cursor | | ctrl + k | Clear all AFTER cursor | | ctrl + w | delete the word BEFORE the cursor | | alt + d | delete the word FROM the cursor | | ctrl + l | Clear the screen (same as clear command) | | ctrl + c | kill whatever is running | | ctrl + d | Exit shell (same as exit command) | | ctrl + t | swap the last two characters before the cursor | | ctrl + y | paste (if you used a previous command to delete) | | ctrl + z | Place current process in background | @@ -41,7 +39,6 @@ Bash | alt + * | | | alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") | | alt + c | | | alt + l | | | alt + n | | | alt + p | | @@ -55,7 +52,17 @@ Bash | !! | Run PREVIOUS command (ie `sudo !!`) | | !vi | Run PREVIOUS command that BEGINS with vi | | cd - | change to PREVIOUS working directory | ## History | command | description | |----------|--------------------------------| | ctrl + r | Search backward starting at the current line and moving 'up' through the history as necessary | | crtl + s | Search forward starting at the current line and moving 'down' through the history as necessary | | ctrl + p | Fetch the previous command from the history list, moving back in the list (same as up arrow) | | ctrl + n | Fetch the next command from the history list, moving forward in the list (same as down arrow) | | ctrl + o | Execute the command found via Ctrl+r or Ctrl+s | | ctrl + g | Escape from history searching mode | # Kill a job n = job number, to list jobs, run `jobs` -
tuxfight3r revised this gist
May 5, 2016 . 2 changed files with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes.File renamed without changes. -
tuxfight3r renamed this gist
May 5, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tuxfight3r renamed this gist
May 5, 2016 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
tuxfight3r revised this gist
May 5, 2016 . 1 changed file with 75 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,75 @@ Bash ==== ## Moving | command | description | |----------|--------------------------------| | ctrl + a | Goto BEGINNING of command line | | ctrl + e | Goto END of command line | | ctrl + b | move back one character | | ctrl + f | move forward one character | | alt + f | move cursor FORWARD one word | | alt + b | move cursor BACK one word | ## Other | command | description | |----------|--------------------------------| | ctrl + d | Delete the character under the cursor | | ctrl + l | Clear the screen (same as clear command) | | ctrl + p | Fetch the previous command from the history list, moving back in the list (same as up arrow) | | ctrl + n | Fetch the next command from the history list, moving forward in the list (same as down arrow) | | ctrl + u | Clear all BEFORE cursor | | ctrl + k | Clear all AFTER cursor | | ctrl + r | Search backward starting at the current line and moving 'up' through the history as necessary | | crtl + s | Search forward starting at the current line and moving 'down' through the history as necessary | | ctrl + c | kill whatever is running | | ctrl + d | Exit shell (same as exit command) | | ctrl + w | delete the word BEFORE the cursor | | ctrl + t | swap the last two characters before the cursor | | ctrl + y | paste (if you used a previous command to delete) | | ctrl + z | Place current process in background | | ctrl + _ | undo | | esc + t | Swap last two words before the cursor | | esc + . | | | esc + _ | | | alt + [Backspace] | delete PREVIOUS word | | alt + < | Move to the first line in the history | | alt + > | Move to the end of the input history, i.e., the line currently being entered | | alt + ? | | | alt + * | | | alt + . | print the LAST ARGUMENT (ie "vim file1.txt file2.txt" will yield "file2.txt") | | alt + c | | | alt + d | | | alt + l | | | alt + n | | | alt + p | | | alt + r | | | alt + t | | | alt + u | | | ~[TAB][TAB] | List all users | | $[TAB][TAB] | List all system variables | | @[TAB][TAB] | List all entries in your /etc/hosts file | | [TAB] | Auto complete | | !! | Run PREVIOUS command (ie `sudo !!`) | | !vi | Run PREVIOUS command that BEGINS with vi | | cd - | change to PREVIOUS working directory | # Kill a job n = job number, to list jobs, run `jobs` ```bash kill %n ``` Example: ```bash kill %1 ``` ## References 1. http://cnswww.cns.cwru.edu/php/chet/readline/readline.html -
tuxfight3r created this gist
Dec 17, 2014 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,27 @@ Ctrl-a Move to the start of the line. Ctrl-e Move to the end of the line. Ctrl-b Move back one character. Alt-b Move back one word. Ctrl-f Move forward one character. Alt-f Move forward one word. Ctrl-] x Where x is any character, moves the cursor forward to the next occurance of x. Alt-Ctrl-] x Where x is any character, moves the cursor backwards to the previous occurance of x. Ctrl-u Delete from the cursor to the beginning of the line. Ctrl-k Delete from the cursor to the end of the line. Ctrl-w Delete from the cursor to the start of the word. Esc-Del Delete previous word (may not work, instead try Esc followed by Backspace) Ctrl-y Pastes text from the clipboard. Ctrl-l Clear the screen leaving the current line at the top of the screen. Ctrl-x Ctrl-u Undo the last changes. Ctrl-_ does the same Alt-r Undo all changes to the line. Alt-Ctrl-e Expand command line. Ctrl-r Incremental reverse search of history. Alt-p Non-incremental reverse search of history. !! Execute last command in history !abc Execute last command in history beginning with abc !abc:p Print last command in history beginning with abc !n Execute nth command in history !$ Last argument of last command !^ First argument of last command ^abc^xyz Replace first occurance of abc with xyz in last command and execute it