108 ms·
Everything in the "Context based tab completion" paragraph is already done by bash_completion. * It knows which commands git takes? Yes. * which hosts are in m
by ithcy2 14y ago
Everything in the "Context based tab completion" paragraph is already done by bash_completion.
* It knows which commands git takes? Yes.
* which hosts are in my hosts file for ssh? Yes.
* which users my system have when I write chmod? Yes.
* available packages to apt-get? Yes.
Plus everything in /etc/bash_completion, plus the hundreds of additional commands in /etc/bash_completion.d, plus many, many online resources for creating your own...
- bjourne 14y agoOne important difference between how that completion works and zsh's is that zsh cycles between the available completions if you repeatedly type tab. E.g. if you have the files [less01.png, less02.png, less03.png] and type "eog less<tab>" in bash will show you the files. Press tab again and it will list the files again. In zsh, the second tab press would fill in "less01.png", then "less02.png" and so on. It's a matter of preference which completion strategy is the best, yes. :) But for me I've found that zsh's way to do it saves me many more keystrokes than bash's way.
- Evbn 14y agoThat is an inputrc configuration not a shell feature. http://stackoverflow.com/questions/7179642/how-can-i-make-bash-tab-completion-behave-like-vim-tab-completion http://stackoverflow.com/questions/7179642/how-can-i-make-ba... Yay Unix. Input collection is a pluggabls component.