0

Hello programmers :),

I'm creating a program that requires too many command line parameters to run. I noticed that many system programs in Ubuntu (my operating system) have the feature of auto-completion of the command line parameters. So, for example, if you type the following in Ubuntu:

sudo apt-get i<tab>

you get the full word you need written as

sudo apt-get install

So is it possible to do this in C++? share the internal command-line parameters with console?

Thank you guys for any efforts :)

3
Contributors
5
Replies
7
Views
6 Years
Discussion Span
Last Post by TheDestroyer
0

That is not a part of the program itself as the program is not running until <Enter> has been pushed on a valid command line.

It is a function of the shell (Bash) what I can not tell you is if it is built into the shell or if the shell is reading a file somewhere allowing you to provide auto-completion data to the shell for your program.

0

Well I did a web search on "linux command line parameter autocomplete" and read the linked articles.

There is related stuff in

/etc/bash_completion.d/
/etc/bash_completion

This is really a Linux not a C++ question so I would recomend you find a good Linux forum and ask there.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.