开发者

Linux executable parameters tab complete

开发者 https://www.devze.com 2023-01-28 23:17 出处:网络
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 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号