Reputation: 1446
In bash, if I were to type which pyth<tab>
it would autocomplete to which python
. I have my own program, limitcpu
, and if I type limitcpu pyth<tab>
nothing happens.
Tab completion still works for files where I provide the path, but I would like it to work with files (programs) in the PATH
environment variable as it does with which
.
Upvotes: 0
Views: 1874
Reputation: 1446
The bash configuration option complete -c <list of commands>
will allow each command in <list of commands>
to autocomplete with other commands.
In this case, put complete -c limitcpu
in ~/.bashrc
or any other place it can be sourced.
Upvotes: 2