Hi Sudip, On Thu, 2021-04-08 at 10:01 +0100, Sudip Mukherjee wrote: > On Wed, Mar 10, 2021 at 04:55:40PM -0700, Kevin Locke wrote: >> trace-cmd installs a bash-completion script to >> /usr/share/bash-completion/completions/trace-cmd/trace-cmd.bash >> Unfortunately, it will not be used because bash-completion dynamically >> loads completion scripts from >> /usr/share/bash-completion/completions/$cmd, so completions for >> trace-cmd must be installed as >> /usr/share/bash-completion/completions/trace-cmd. > > Thanks for the report. Not sure how I missed this in my initial test. :( > But I think the rename is not required as bash-completion loads "$cmd" > or "$cmd.bash" or "_$cmd". And, so based on my testing only installing > /usr/share/bash-completion/completions/trace-cmd.bash does make it work. > > Can you please confirm from your setup before I upload the new version + > this fix..
Sure thing. I can confirm that installing the completion script as /usr/share/bash-completion/completions/trace-cmd.bash works on my system. You are right that "$cmd", "$cmd.bash" or "_$cmd" should work. I think the leading underscore is generally used for fallback by bash-completion, as in commit 4d8e1520, but I'm not aware of any convention around use of the .bash extension. Installing as /usr/share/bash-completion/completions/trace-cmd.bash sounds good to me. Thanks for working on it! Kevin [4d8e1520]: https://github.com/scop/bash-completion/commit/4d8e152039311e2bebf3d3ecb875e570b3171865