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
移動(Moveing)
| Shortcut | 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 | 清屏 |
複製粘貼(Killing And Yianking)
| Shortcut | Comment | 中文註釋 |
|---|
Ctrl+K | Cut text to the end of line | 剪切到行尾 |
Ctrl+U | Cut text to the beginning of line | 剪切到行首 |
Alt+D | Cut text to the end of the current word | 剪切到單詞尾 |
Ctrl+W | Cut the word behind point, using white space as a word boundary | 剪切到單詞頭 |
Ctrl+Y | Yank the top of the kill ring into the buffer at point | 粘貼剪貼板內容 |
Alt+Y | Rotate the kill-ring, and yank the new top. if the prior command is yank or yank-pop | 在剪切板裏面循環 |
更改文本(Changing Text)
| Shortcut | Comment | 中文註釋 |
|---|
Ctrl+D | Delete the character at point | 刪除光標處字符 |
Ctrl+H | Delete previous character | 往前刪字符 |
Ctrl+T | Transpose characters | 往前交換字符 |
Meta+T | Transpose words | 往前交換單詞 |
Alt+U | Uppercase the current word | 大寫 |
Alt+L | Lowercase the current word | 小寫 |
Alt+C | Capitalize the current word | 首字母大寫 |
歷史(History)
| Shortcut | 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. | 插入上一個命令的第N個參數 |