I've installed zsh and oh-my-zsh on my Mac terminal, then CTRL+U cut everything I input, no matter where the cursor is.

If it's a common case, how can I set the CTRL+U to the original behavior?


Execute, or most likely add it in your ~/.zshrc to always have it:

bindkey "^U" backward-kill-line
  • thanks for the answer, also I find bindkey command (without any arguments) could list all hotkey in shell, which is very useful – chrisyue Apr 19 '19 at 2:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.