-
Notifications
You must be signed in to change notification settings - Fork 178
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 completions broken in yadm 3.0.0 #292
Comments
What version of zsh are you using? |
zsh 5.7.1 (x86_64-apple-darwin19.0) |
Can you try this to verify that it isn't something in your setup: zsh -f
fpath=(/usr/local/share/zsh/site-functions $fpath)
autoload compinit
compinit and then try to complete yadm commands again? |
I do not get the error, but I also do not get any suggestions either. Only folder names appear for autocompletion. |
Then the fpath is probably wrong. Does the path added contain the file |
I'm not a zsh user, and I just attempted to use the completions installed via HomeBrew. I put this in my .zshrc as suggested by HomeBrew:
And then started a zsh, and typed "yadm ", and I'm met with this error:
and then afterwards, only get directory completions... I'm not sure where that comes from yet, but I would guess it comes from the inherited git completions. I see this in /usr/local/share/zsh/site-functions/_git:
But I'm not sure where |
It seems like the git completion shipped with git differs from the git completion shipped with zsh. The new yadm completion requires the latter. If you try removing the |
It works if i rename/remove the _git symlink. |
I'm away at the moment, but later I'll dig into where the _git completions in home brew are coming from. I think there may still need to be some mitigation for this situation. |
Yes, I think we should keep this issue open until a proper fix is in place. The git completions comes from the git package according to the image above (seen in symlink). |
Again, I'm away, but in my setup, there was also a second git completion. I'll look into it later for sure. |
My other git completions come from a zsh plugin called |
I've been able to reproduce this issue. I'll have a look and see if I can come up with a solution. |
I've just posted a PR that works for me in my testing. But more testing is of course welcome. |
@sidmadala I have tested @erijo's changes, and they work for me. It would be great to get further confirmation. Is it possible to copy the The brew reinstall should put the Git completions back into place if they were removed. |
I didn't get an error, but completions were stalling out zsh so bad I had to kill them so I unloaded them.
|
@xenoterracide: is this also with the fixed completions on the develop branch? |
Don't rely on internals from the git completion, instead set up the environment and then simply call _git and let it do it's completion as it see fit. See yadm-dev#292.
@sidmadala: the mixed spacing was a consequent of how the completion was done. All: I've now done yet another retake on the completion (see my zsh-completion branch) where I've simplified the completion and stopped using internal functions from the git completion. I've only done some simple testing so far, but it seems to work well. Please try it and see if it works for you as well. |
@erijo, looks good to me. Separating the |
Don't rely on internals from the git completion. Instead set up the environment and then simply call _git and let it do the completion as it see fit. See yadm-dev#292.
@erijo - Can you create a new PR for the updated zsh completions? (assuming the are working better) |
@TheLocehiliosan: yes, will do. I have a few minor things to fix first. |
Don't rely on internals from the git completion. Instead set up the environment and then simply call _git and let it do the completion as it see fit. See yadm-dev#292.
Don't rely on internals from the git completion. Instead set up the environment and then simply call _git and let it do the completion as it see fit. See yadm-dev#292.
just an FYI I plan on testing this, just haven't gotten around to it yet. no later than this weekend though, maybe tonight. I should probably update the aur |
Describe the bug
Yadm 2 completions worked very well, but when upgrading to version 3.0.0 through Homebrew, pressing
tab
yields the following error on the first try followed by silence on any other attempts in the shell. The completions file_yadm
still exists in the proper/usr/local/share/zsh/site-functions
directory.To reproduce
Can this be reproduced with the yadm/testbed docker image: Most likely no since I use MacOS and Homebrew
Steps to reproduce the behavior:
yadm
TAB
Expected behavior
I'd expect the completions to show up with a description of each command.
Environment
yadm 3.0.0
git version 2.30.0
The text was updated successfully, but these errors were encountered: