Currently when I'm in my home folder and I want to cd
into Documents I type cd D
and hit Tab, Bash shows me the list of folders that match D
.
What I want to occur is when I press Tab, bash autocompletes with the first option that matches what I've put in and each time I press Tab it cycles through to the next option.
Is there any way to do this? I thought for sure my copy of Bash on my old Ubuntu box had this feature.
Bash completion is a bash function that allows you to auto complete commands or arguments by typing partially commands or arguments, then pressing the [Tab] key. This will help you when writing the bash command in terminal.
The programmable completion feature in Bash permits typing a partial command, then pressing the [Tab] key to auto-complete the command sequence. [1] If multiple completions are possible, then [Tab] lists them all.
The completion script is code that uses the builtin Bash command complete to define which completion suggestions can be displayed for a given executable. The nature of the completion options vary, from simple static to highly sophisticated.
Yes! I found the answer to the question at the following link at MacWorld
put the following in .bashrc or .bash_login
bind '"\t":menu-complete'
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With