【发布时间】:2012-09-02 07:21:30
【问题描述】:
在 bash 命令行中,如何删除光标前的所有字母?我知道 Ctrl-k 会删除光标之后的所有内容。
【问题讨论】:
标签: bash command-line
在 bash 命令行中,如何删除光标前的所有字母?我知道 Ctrl-k 会删除光标之后的所有内容。
【问题讨论】:
标签: bash command-line
Ctrl-u - Cut everything before the cursor
其他 Bash 快捷方式,
Move cursor to beginning of line
Move cursor to end of line
Move cursor back one word
Move cursor forward one word
Cut the last word
Cut everything after the cursor
Paste the last thing to be cut
Undo
并通过 bash shell 的手册页发现更多信息:man bash
其他 bash 命令行快捷方式备忘单:http://www.bigsmoke.us/readline/shortcuts
在此处查看文档:http://www.gnu.org/software/bash/manual/bashref.html#Commands-For-Killing
必读:通过 Julia 的漫画了解有关 Bash、Linux 和技术的更多信息:https://twitter.com/b0rk/media
【讨论】:
man 后跟您正在使用的 unix 工具的名称(例如 man bash)。
【讨论】:
热键 Ctrl+U 应该会为您执行此操作。
【讨论】:
Ctrl+x 退格清除光标当前位置之前的所有条目
【讨论】: