Readline常用快捷键

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)


ShortcutComment中文注释
Ctrl+AMove to the start of the current line移动到行首
Ctrl+EMove to the end of the line移动到行尾
Ctrl+F / Move forward a character前移一个字符
Ctrl+B / Move backward a character后移一个字符
Alt+FMove forward one word前移一个单词
Alt+BMove backward one word后移一个单词
Ctrl+LClear screen清屏

复制粘贴(Killing And Yianking)


ShortcutComment中文注释
Ctrl+KCut text to the end of line剪切到行尾
Ctrl+UCut text to the beginning of line剪切到行首
Alt+DCut text to the end of the current word剪切到单词尾
Ctrl+WCut the word behind point, using white space as a word boundary剪切到单词头
Ctrl+YYank the top of the kill ring into the buffer at point粘贴剪贴板内容
Alt+YRotate the kill-ring, and yank the new top. if the prior command is yank or yank-pop在剪切板里面循环

更改文本(Changing Text)


ShortcutComment中文注释
Ctrl+DDelete the character at point删除光标处字符
Ctrl+HDelete previous character往前删字符
Ctrl+TTranspose characters往前交换字符
Meta+TTranspose words往前交换单词
Alt+UUppercase the current word大写
Alt+LLowercase the current word小写
Alt+CCapitalize the current word首字母大写

历史(History)


ShortcutComment中文注释
Ctrl+RSearch backwards in history向前搜索历史
Ctrl+SSearch 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个参数
最后修改于: Monday, August 28, 2023
欢迎关注微信公众号,留言交流;也欢迎使用我开发的微信小程序。

相关文章:

翻译: