Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

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.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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)

share|improve this answer
    
I've heard of zsh many times but have never had a compelling reason to try it. I do now. Thanks! –  Tom Dworzanski Aug 11 at 5:19

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.