Linux executable start page complete

I am using Ubuntu. For many executables (i.e. Valgrind), you can begin to enter a parameter, such --leak-check=fullas tab-complete, at the time you enter--le

I recently added a parameter --versionto my own program (in C ++).

Question . How to add this functionality for tab-completion arguments?

+3
source share
3 answers

You can define that in /etc/bash_completion( change: and /etc/bash_completion.d/).

Take a look at this article: http://www.debian-administration.org/articles/316

+8
source

This is a shell function (I believe bash is used by default for Ubuntu), not your program.

0
source

Source: https://habr.com/ru/post/1778835/


All Articles