-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Command not found for zsh completion #585
Comments
Actually, this is the wrong error, I'm getting something different in my host terminal.
|
Hi, I'm afraid but I'd need help from someone familiar with zsh to resolve this issue. |
This seems to work if I do Reading some issues, I suspect the intention was that the completion would be a build artifact that ended up at /usr/lib/gopass/_gopass.zsh or something. https://github.com/zsh-users/zsh-completions/blob/master/zsh-completions-howto.org might be worth reading, but I'm not certain. |
Naturally, I think I found the dynamic solution straight after I posted that.
The head/tail drop the "broken" lines. I think the |
Thanks for investigating! I'm still not exactly sure what the fix should look like. Would be amazing if someone using zsh could create a PR. Otherwise I'll need some time to have a look at the zsh docs and see what I can do, but this may take a few days. |
@dominikschulz I think you need to remove the Then add |
Sourcing Yes, the suggested changes will break the completion. |
I don't know the given distro/OS. But if the completion is not package properly the solution is Then you remove |
The documentation doesn't indicate this, and says to source from the output of that. |
@SevereOverfl0w I'll look over the documentation try explain the situation better. Thanks |
I've just hit this installing the rpm in centos. completion is not working. not sure what to do. this hack worked by @SevereOverfl0w for me: source <(gopass completion zsh | head -n -1 | tail -n +2)
compdef _gopass gopass |
@Foxboron, how do you actually restart |
rm the .zcompdump file in home then If your distribution doesn't include completion create a bug report to them. |
The whole purpose of @Foxboron's change, is that attempting to source the completion definition is a completely broken way to handle zsh completion and should not be done. zsh has an excellent completion system that works properly, as long as you actually use it. Given that one of the major touted benefits of zsh is the completion system, any zsh installation that does not even use it is, well, broken. The properly-written zsh completion for gopass is meant to be installed in the zsh completions directory, as defined by either the OS-level No user action or configuration in any way shape or form is required, other than making sure that the generic completion system is hooked up. This is, after all, far more convenient than requiring every single user-installed program to inject itself into the user's shell rc files. Again, this is the recommended and intended way that zsh completions are meant to be done. The fact that people were |
@Foxboron @eli-schwartz, I just tried the procedure on an updated arch linux now.
however, after deleting ~/.zcompdump and issuing here is the result of /usr/local/share/zsh/site-functions
/usr/share/zsh/site-functions
/usr/share/zsh/functions/Calendar
/usr/share/zsh/functions/Chpwd
/usr/share/zsh/functions/Completion
/usr/share/zsh/functions/Completion/Base
/usr/share/zsh/functions/Completion/Linux
/usr/share/zsh/functions/Completion/Unix
/usr/share/zsh/functions/Completion/X
/usr/share/zsh/functions/Completion/Zsh
/usr/share/zsh/functions/Exceptions
/usr/share/zsh/functions/Math
/usr/share/zsh/functions/MIME
/usr/share/zsh/functions/Misc
/usr/share/zsh/functions/Newuser
/usr/share/zsh/functions/Prompts
/usr/share/zsh/functions/TCP
/usr/share/zsh/functions/VCS_Info
/usr/share/zsh/functions/VCS_Info/Backends
/usr/share/zsh/functions/Zftp
/usr/share/zsh/functions/Zle
/home/ninrod/.dotfiles/deps/zsh/ninrod/docker-compose-zsh-completion/src
/home/ninrod/.dotfiles/deps/zsh/ninrod/docker-zsh-completion/src
/home/ninrod/.dotfiles/deps/zsh/ninrod/pass-zsh-completion/src
/home/ninrod/.dotfiles/deps/zsh/zsh-users/zsh-completions/src here are my full zsh dotfiles: https://github.com/ninrod/dotfiles/tree/master/zsh |
@ninrod Works for me so unsure, make sure all .zcompdump files are deleted. If it still doesn't work it's better to submit a bug to our tracker then using the upstream tracker. |
@Foxboron it worked allright for me. the issue was that I was using gopass 1.6.6. upgrading to 1.6.7 did the trick. |
This worked for me on mac os.
|
having the same problem after upgrading my system (arch linux) I'd assume some zsh update issue? |
It depends on if the arch linux package has been updated to respect the newly generated files. |
In debian package file Current workaround for me:
|
The biggest problem I can see coming with this, is the update process when using Maybe the simplest way around it could be to instruct people to add this in their
so it would add the folder However I do not know whether it is considered bad practice or not to tell people to add a folder to their fpath. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
I'm getting a similar, possibly related issue. If I press any key, then space (for completion), it prints something like this:
|
Fixes gopasspw#585 Fixes gopasspw#1424 RELEASE_NOTES=[DOCUMENTATION] Improve documentation of Zsh completion setup Signed-off-by: Yolan Romailler <yolan@romailler.ch>
I use
zsh -d -f
to start zsh without an rc.The text was updated successfully, but these errors were encountered: