I love the zsh autocompletion for navigating in files with commands like cd, but some commands have weird autocompletion, for example: when i type snap ins, bash autocompletes that to snap install, but zsh cycles between snap Desktop, snap Music and snap snap and then back to snap ins.

Other commands, like apt ins complete to apt install just fine, both in zsh and bash. Same with apt install gedi autocompletes and cycles tough further options just fine.

Is there any way that I can change the zsh autocompletion for commands to be more like bash? But still keep the cycling trough multiple options and menu style navigation.

Can I make bash autocompletion cycle trough options?

  • 1
    I think the behavior you're seeing means ZSH just doesn't know how to complete commands for snap (probably because nobody has written a completion function for it yet or you don't have that installed), so it just cycles through file/folder names. – Wieland Jun 15 '16 at 14:58
  • Oh, cool, can i add these things myself? or can i make bash autocompletion cycle trough options? – Frederik Baetens Jun 15 '16 at 15:39
  • I found out how to make bash autocomplete closer to zsh autocomplete, just add this to .bashrc: bind 'set show-all-if-ambiguous on' bind 'TAB:menu-complete' – Frederik Baetens Jun 15 '16 at 16:57

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.