Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [RFC/PATCH] completion: git: add fast mode



On 11/25/20 5:34 PM, Felipe Contreras wrote:
I think the overall end goal would be to move as much as possible of
the completion to the Git project itself. For example; git commands
have the --git-completion-helper option, which throw something like:

   % git version --git-completion-helper
   --build-options --no-build-options

There is no _git_version() specific function in Git's bash completion,
and yet when you type "git version --<tab>" the options are completed
anyway.

This helps so that new commands get some automatic completion, even
when nothing specific for them is done in the completion script.

It has been discussed in the mailing list to add something similar for
zsh specific completion, so the descriptions are generated too, and
shorthand forms, perhaps with --git-completion-helper=zsh.

This is a form of completion that may work for bash since it's completion system
is simpler and user expectation is (seemingly) solely "press tab and stuff appears".
where as zsh's completion systems allows the user to manipulating the results in
various ways which could be lost once $program handles the completion.

like adding additional results
overriding opinionated file completion set by the author(s)
omitting options you don't want presented to you.
grouping results by tags.
just to name a few.

zsh's completion system is far more powerful than just presenting a pseudo static
list of options with descriptions.




Messages sorted by: Reverse Date, Date, Thread, Author