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个参数 |