Is there anyway that I can hook into the tab completion for bash from a C or C++ progra, specifically for arguments.
For example if I wanted to do ./myprogram st
TAB it would complete to start
.
I wasn't sure if this was something I can hook into during compile and put in like the metadata or if its a bash call/script that I have to make to register the tab completions with bash.
It is indeed possible to customize completion in bash, although it's not something a program can do for itself. Here is the start of a two-part article that explains what you need to know.
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