如何在Linux Bash Shell命令行右侧删除整个单词

Vic*_*Lee 1 bash shortcut readline

如何在Linux Bash Shell命令行右侧删除整个单词

如:

CTRL U = Delete left of the cursor
CTRL K = Delete right of the cursor
CTRL W = Delete word on the left
Run Code Online (Sandbox Code Playgroud)

我想知道一种删除右侧整个单词的快捷方式,无论单词中的光标在哪里,就像在vim opt中一样:

daw
Run Code Online (Sandbox Code Playgroud)

我想在bash命令行中得到相同的结果。

tsh*_*ono 8

尝试:Esc+D或Alt+D删除右侧的单词。

  • 这会将光标右侧的字移动到环形缓冲区中。最后添加的元素可以通过 Ctrl+y 访问。然后可以通过重复 Esc+y 调用环形缓冲区中可能存在的其他元素。 (4认同)