help complete shows:

$ help complete


                   5001
complete: complete [-abcdefgjksuv] [-pr] [-DEI] [-o option] [-A
action] [-G globpat] [-W wordlist] [-F function] [-C command] [-X
filterpat] [-P prefix] [-S suffix] [name ...]
    Specify how arguments are to be completed by Readline.

    For each NAME, specify how arguments are to be completed.  If no options
    are supplied, existing completion specifications are printed in a way that
    allows them to be reused as input.

But if I do `complete git' at a new shell, then completion for git
subcommands seems to stop working.  So it seems that at least in this
case the help is ending up wrong (it changes things rather than just
interrogating).

I found this in the course of trying to find how git is demand-loading
it's completion setup.  I didn't even find an entry point loaded at
source-time in 
https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
and none of the functions in there are loaded until completion of a
git subcommand has been attempted.

so I suspect the above behavior is related to how demand-loading is
accomplished for git (which I have no idea about yet).

Britton

Reply via email to