Readline Shortcut
GNU Readline is a software library that provides in-line editing and history capabilities for interactive programs with a command-line interface, such as Bash and IPython.
man readline
or readline
Moving
Shortcut |
Comment |
Chinese Comment |
Ctrl +A |
Move to the start of the current line |
|
Ctrl +E |
Move to the end of the line |
|
Ctrl +F / → |
Move forward a character |
|
Ctrl +B / ← |
Move backward a character |
|
Alt +F |
Move forward one word |
|
Alt +B |
Move backward one word |
|
Ctrl +L |
Clear screen |
|
Copy and Paste (Killing and Yianking)
Shortcut |
Comment |
Chinese Comment |
Ctrl +K |
Cut text to the end of line |
|
Ctrl +U |
Cut text to the beginning of line |
Cut to the beginning of the line |
Alt +D |
Cut text to the end of the current word |
Cut to the end of the word |
Ctrl +W |
Cut the word behind point, using white space as a word boundary |
Cut to the beginning of the word |
Ctrl +Y |
Yank the top of the kill ring into the buffer at point |
Paste the clipboard contents |
Alt +Y |
Rotate the kill-ring, and yank the new top. If the prior command is yank or yank-pop |
Cycle through the clipboard |
Changing Text
Shortcut |
Comment |
Chinese Comment |
Ctrl +D |
Delete the character at point |
Delete the character at the cursor |
Ctrl +H |
Delete previous character |
Delete previous character |
Ctrl +T |
Transpose characters |
Transpose characters forward |
Meta +T |
Transpose words |
Transpose words forward |
Alt +U |
Uppercase the current word |
|
Alt +L |
Lowercase the current word |
|
Alt +C |
Capitalize the current word |
|
History
Shortcut |
Comment |
Chinese comment |
Ctrl +R |
Search backwards in history |
|
Ctrl +S |
Search forwards in history |
|
Alt +. |
Insert the last argument of the previous command |
|
Alt + number + . |
With an argument n, insert the nth word from the previous command. |
|