Linux executable parameters tab complete
I use Ubuntu. For many executables (i.e. valgrind) you can start typing a parameter like --leak-check=full
and tab-complete it by the time you type --le
I recently added --version
parameter to my开发者_Python百科 own program (in c++).
Question: How can I add this functionality of tab-completion of arguments?
You can define that in /etc/bash_completion
(edit: and /etc/bash_completion.d/
).
Have a look at this article: http://www.debian-administration.org/articles/316
This may be useful.
This is a feature of the shell (I believe the default for Ubuntu is still bash) you are using, not your program.
精彩评论