2 ms·
bash-completion already does that, and it works OK, but is limited. It's used on most Linux distros, so you've likely already used that code path. It actually
by chubot 6y ago
bash-completion already does that, and it works OK, but is limited. It's used on most Linux distros, so you've likely already used that code path.
It actually invokes --help dynamically you hit `<TAB>` and parses the output dynamically. Whereas other systems do it offline in a batch job, e.g. some fish completions.