How do I clear a suggestion when history-beginning-search-backward is invoked?

For example:

sudo vim
#history-beginning-search-backward gets executed by a keybinding
sudo vim /etc/hosts

Once in that state, how can I go back to sudo vim?

It would be useful to know for both Bash and ZSH.

  • I updated your title as the initial one repeated itself. Please re-correct it if I misinterpreted your intention. – Jeff Schaller Apr 4 '18 at 9:26

Your Answer

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

Browse other questions tagged or ask your own question.