3

How can I make bash show completion suggestions without having to press [tab]. I'd like the suggestions to update on each character I add and maybe to have the ability to quickly pick an option. I'd like it to work like an IDE. I want this because it would be faster.

1 Answer 1

3

Real autocompletion is not available for bash,
but you can get it for zsh.

https://github.com/tarruda/zsh-autosuggestions

You should know that any kind of autosugestion is really tricky if there are other semiautomatic features, like prompt updates.

Depending on your own shell setup, that can interact with the completion, it may not work perfectly, but still very interesting.

The reason autocompletion is available on zsh, but not bash is that it is easier to implement in zsh because it has more detailed support for command line interaction, compared to readline used by bash.


There is also
https://github.com/hchbaw/auto-fu.zsh
which may be useful, but seems to be no longer active.



Side note on zsh:

You may already know zsh, but if not:
If you like this kind of advanced interaction with your tools, you should take a close look at zsh because that's the main difference between bash and zsh.
bash has a focus on being a good standard shell, and tries to provide good interaction.
zsh has a focus on good interaction, and tries to be a good standard shell.
(For scripting, it's a good idea to continue using bash for this reason)

1
  • 1
    I've heard of zsh many times but have never had a compelling reason to try it. I do now. Thanks!
    – user38810
    Aug 11, 2014 at 5:19

You must log in to answer this question.