I read the answer https://stackoverflow.com/a/13614816/4126652 and tried out the history-beginning-search-menu

I added the the 3 lines to my zshrc

autoload -Uz history-beginning-search-menu
zle -N history-beginning-search-menu
bindkey '^X^X' history-beginning-search-menu

Now let us say i have two items in history where item 2 is just a pipe on item 1 like:

cat #now i press ctrl-x-x
Enter digit:
1 cat /etc/apt/sources.list                2 cat /etc/apt/sources.list | grep ubuntu

Then pressing 1 does the completion perfectly, however pressing 2 does nothing.

Has anyone run into this problem , am i missing something, i use oh-my-zsh standard configuration, does it conflict with this menu?

Please mention if any other detail is required.

  • For me the history-beginning-search-menu widget errors in the same way as for you. Some commands, maybe 50% work fine, others do nothing, they just make the menu go away – the_velour_fog Sep 15 '16 at 9:18
  • Exactly i am thinking it has something to do with the pipe, the simple commands work fine. – Vikash B Sep 15 '16 at 9:37
  • yea, I had some long commands wrapping around the terminal, I thought those might be it, but no, I think you might be right its possibly commands that contain characters that have meaning to zsh or one of its modules, i.e. zle – the_velour_fog Sep 15 '16 at 9:41

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.