O arquivo $fpath/_git-flow fornece conclusão para git-flow (com traço), veja sua primeira linha:
#compdef git-flow
Então, usando git-flow [CTRL+X] [h] , obtenho
$ git-flow [CTRL+X] [h]
tags in context :completion::complete:git-flow::
argument-1 (_arguments _git-flow)
tags in context :completion::complete:git-flow:argument-1:
commands (_describe _git-flow)
mostrando que zsh detecta que o prompt agora está no primeiro argumento para git-flow .
A função de conclusão para git é muito poderosa (e para ser honesto, eu não posso, ler "it through"), então também git flow (w / o dash) fornece o git-flow conclusão, mas o contexto é diferente:
$ git flow [CTRL+X] [h]
tags in context :completion::complete:git::
argument-rest (_arguments _git)
tags in context :completion::complete:git-flow::
argument-1 (_arguments _git-flow _call_function _git)
tags in context :completion::complete:git-flow:argument-1:
commands (_describe _git-flow _call_function _git)
Se estiver usando um módulo git inexistente, acabo com
$ git foo [CTRL+X] [h]
tags in context :completion::complete:git::
argument-rest (_arguments _git)
tags in context :completion::complete:git-foo::
directories (_files _git)
globbed-files (_files _git)
all-files (_files _git)
que parece mais próximo do seu resultado.
Portanto, minhas sugestões seriam:
- verifique se o arquivo
_git-flowcompletions não está corrompido e tem os endings de linha (EOL) corretos -
conclusão do disparo para fluxo git com, e.
git-flow [CTRL+X] [h]e dê uma olhada na saída dewhich _git-flow:-
se a função de conclusão não puder ser lida, isso resultará em
$ which _git-flow _git-flow () { # undefined builtin autoload -XUz } -
se for lido corretamente, você obtém a função impressa:
$ which _git-flow _git-flow () { local curcontext="$curcontext" state line typeset -A opt_args _arguments -C ':command:->command' '*::options:->options' ...
-
-
tente compilar o arquivo de função
_git-flowcomzcompile _git-flowpara ver se haverá um erro. (Em seguida, o arquivo resultante_git-flow.zwcdeve ser lido no autoloading.) - examine
~/.zcompdumpse a conclusão de_git-flowestiver listada.