Leveraging the completion system to discover available options in a comm
From:
Idan Kamara
Subject:
Leveraging the completion system to discover available options in a command
Date:
Fri, 1 Mar 2013 15:27:31 +0200
Hi,
Is it possible to use the completion system to get a list of available
options for a command bash knows how to auto-complete?
Ideally, I'd like given the name of a program to get a list of pairs
(option string, desc) for each available option. I'd be nice to also
get options that are only available in a specific context, but given
how the completion system works, I'd guess that that might be
impossible.