-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zsh completion fixes #1047
Zsh completion fixes #1047
Conversation
We need to load bashcominit, otherwise complete() isn't available. __git_complete:5: command not found: complete Signed-off-by: Felipe Contreras <[email protected]>
COMPREPLY and compgen aren't supposed to be used directly. Also in order for the Git's zsh emulation to work correctly, _tig shouldn't be exposed. Signed-off-by: Felipe Contreras <[email protected]>
We don't need all Zsh's bash completion emulation (which is buggy), it's better to use Git's Zsh completion. Signed-off-by: Felipe Contreras <[email protected]>
The intention e073f1b seems to be to use the completer for |
No, not the one provided by Zsh, the one provided by Git: https://git.kernel.org/pub/scm/git/git.git/tree/contrib/completion/git-completion.zsh The one provided by Zsh would not load the tig bash completion function |
@@ -33,8 +33,6 @@ __tig_options=" | |||
-v --version | |||
-h --help | |||
-C | |||
-- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, why did you reve these two lines? They are valid completion options :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because they confuse __gitcomp
. Well, at least the --
one.
Most commands do have the --
option, but none that I'm aware of actually add it to the completion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
okay, then that sounds fine to me too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A big thanks for looking into this issue (especially as my previous attempt in 2.5.1 did more bad than good).
There's a bunch of issues regarding the zsh completion:
These changes should fix the issues mentioned in pull #960 and #940.