Skip to content
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

complete_aliases breaks completion #34

Closed
palb91 opened this issue Dec 29, 2020 · 1 comment
Closed

complete_aliases breaks completion #34

palb91 opened this issue Dec 29, 2020 · 1 comment

Comments

@palb91
Copy link

palb91 commented Dec 29, 2020

Hi!
I use zsh-z since a long time now, but it's just recently that I dig into a little bug: I wasn't able to have the completion for the command.
I added a dirty hack at the end of my zshrc: compdef _zshz t (with ZSHZ_CMD=t).
So I finally figured out (today) that the problem appears when COMPLETE_ALIASES is set.
I also discovered today that the problem was already found with #1, I think it could be a good idea to either solve the problem… or easier to add it to the README.
Thanks for your great work ;)

@agkozak
Copy link
Owner

agkozak commented Jan 2, 2021

Thanks so much for reporting in!

Yes, the behavior you describe is correct. setopt COMPLETE_ALIASES always divorces an alias's completion from that of the command it invokes. z or the contents of $ZSHZ_CMD (or $_Z_CMD) are aliases, so they're affected. Your "dirty hack," though, is completely legitimate; you're just establishing one exception to a general rule.

I agree that the documentation should explain that. I'll add to it tomorrow.

Thanks for helping to improve this plugin!

@agkozak agkozak closed this as completed Jan 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants