Which shortcut in Zsh does the same as Ctrl-U in Bash?

后端 未结 1 683
长情又很酷
长情又很酷 2021-01-30 10:17

In Bash, when I am typing a command, I press Ctrl+U, all characters from the beginning of the line to the cursor are going to be removed. However, in zsh,

相关标签:
1条回答
  • 2021-01-30 10:38

    It sounds like you'd like for Ctrl+U to be bound to backward-kill-line rather than kill-whole-line, so add this to your .zshrc:

    bindkey \^U backward-kill-line
    

    The bindkey builtin and the available editing commands (“widgets”) are documented in the zshzle man page.

    0 讨论(0)
提交回复
热议问题