Colin Watson writes ("Re: Bug#928704: dgit: add bash completion for
command-line options"):
> I believe that in general terms the two strategies are to enumerate all
> the possible options separately or to have some way to ask the program
> which options it supports. The bash-completion file for git appears to
> take the former strategy for the relatively small number of options
> supported by the top-level git program, and the latter strategy for git
> subcommands (see e.g. "git checkout --git-completion-helper").
In the case of dgit, the command line parser is not table driven
(although it does have some tables) so the latter strategy won't work.
But I think the option parser perl code could be scanned by some
ad-hoc perl code, at package build time. It's mostly quite formulaic.
I can probably implement something like that, given a hand-coded
completion file (perhaps a partial one) and someone to ask questions.
Ian.
--
Ian Jackson <[email protected]> These opinions are my own.
If I emailed you from an address @fyvzl.net or @evade.org.uk, that is
a private address which bypasses my fierce spamfilter.