Description
\c + A: Express Ctrl + A
\a + A: Indicates Alt+a
List of commands:
1 Move:
\c + A: Moves the cursor to the beginning of the line
\c + E: Moves the cursor to the end of the line
\c + F: Moves the cursor backward (right) one character
\c + B: Move the cursor forward (left) one character
\c + around: The cursor moves about between words
\c + XX: Move between the end of the command line and the cursor (the measured moving position is rather strange, there is no law found at the moment)
2 Edit
\c + D: one character after the cursor (right) is removed (same as the keyboard delete key function)
\c + H: Delete one character (same as keyboard backspace function) before the cursor (left)
\c + W: the character of a word (\a + backspace has the same effect), starting with the cursor and moving forward (left)
\a + D: The character of a word is deleted backwards (right), starting with the cursor
\c + K: Delete all characters after the cursor
\c + u: Delete all characters before the cursor
\c + _: (The actual key is ctrl+shift+-): Undo operation, Restore the previous state
\c + y: Pastes the contents of the previous delete to the cursor. After the measurement, can only paste the deletion of multiple characters, like C+d (h) Deleted single character cannot be pasted with this
\c + t: Swap the position of the character at the cursor with the previous character
3 Find History
\c + P: previous command
\c + N: Next command
\c + R: Search history Command, as input displays a match command in the history command, the ENTER key executes the matching command, and the ESC key is displayed at the command line without executing the matching command.
\c + G: Exit from historical search mode (CTRL–R). (Esc key is also possible)
4 Bang (!) Command
- !! : Executes the previous command.
- ^foo^bar: replace Foo in the previous command with bar and execute.
- !wget: Executes the most recent command that starts with wget.
- !wget:p: Only the most recent command starting with wget is printed, not executed.
- !$: The last parameter of the previous command, same as
Alt - .
and $_
.
- !*: All parameters of the previous command
- !*:p: Print the previous command is all parameters, that is,
!*
the content.
- ^ABC: Deletes ABC from the previous command.
- ^foo^bar: replace Foo in the previous command with bar
- ^foo^bar^: replace Foo in the previous command with bar
- !-n: Executes the first n command, executes the previous command:
!-1
, the first 5 commands are executed in the following format:!-5
5 control commands
- Ctrl–l (lowercase L): Clears the screen and then, at the top, displays the contents of the line where the cursor is currently located.
- Ctrl–o: Executes the current command and selects the previous command.
- Ctrl–s: Block Screen output
- Ctrl–q: Allow screen output
- Ctrl–c: Abort command
- Ctrl–z: Suspend command
Shortcut keys under the Linux terminal command line