You are not logged in.
Pages: 1
I installed bash-completion package. what should I do to enable autocompletion and selection using tab key
Thank you.
Offline
bind 'set show-all-if-ambiguous on'
bind 'TAB:menu-complete'
This doesn't make bash work exactly as zsh/other shells tho. Zsh/other shells will complete up until the next ambiguous match. Bash will just cycle through all matches.
e.g.
`$ ls ~/.ba<tab>
bashrc .bash_history .bash_profile`
* zsh: will complete up until ~/.bash and present a list of matches which handily enables you to append _ and hit `<tab>` again.
* bash: will just cycle through all ~/.ba* matches.
Offline
Thank you for your help
Offline
Please always remember to mark resolved threads by editing your initial posts subject - so others will know that there's no task left, but maybe a solution to find.
Thanks.
Offline
It seems that after reboot I cannot use tab key for selection or autocompletion. Only if I run the command again its working.
If I include these commands in bash.bashrc file will it work permanently
Last edited by NoobArchUser (2025-10-07 05:38:42)
Offline
You're supposed to source /usr/share/bash-completion/bash_completion in some bashrc (either global or local, see https://wiki.archlinux.org/title/Bash#C … tion_files and make it a bashrc, not bash_profile)
Offline
Pages: 1