I was messing around with fish and noticed this handy behavior
If I typed wget -<tab><tab><tab>
, I was put into an interactive menu. However, when I typed, I searched the descriptions of the arguments themselves. I tried this in zsh, and typing in this menu only seemed to bring me back to my interactive prompt. Is there a way to achieve similar functionality in zsh?
Best Answer
Try to put this in your
.zshrc
file:Now if you type
wget -<tab>
menu with autocompletions appears. We defined keybind for this menu, so if you press?
search line appears on the top of the completions:Some additional tips:
bindkey -M menuselect '/' history-incremental-search-backward
for backward search?
during a search again selection will jump to the next search result. Use/
for jump to previous resultcomplist
documentation to find additional functions and optionsvi-insert
complist function - it filters completions based on what you type.