I'm trying to figure out how to implement tab completion for subcommands in a C++ application. I would like it to function much like Git's tab completion. I'm trolling through Git's source, but it's not jumping out at me.
I've searched for ways to implement tab completion and haven't found a straight-forward answer, so I'm guessing it might not necessarily be a feature each individual application has to implement. Is tab completion a feature of the particular shell the application is being executed from? What are the basics I need to know about getting my application to support tab completion (particularly in C++)?
--helpresults to find out the valid options. Some programs do have an interactive mode though, in which they implement their own tab completion. - Tony Delroytsetreturns terminal settings), but it's highly unusual and of dubious value. - Tony Delroy