-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
linkerd completion command does not work as expected #3999
Comments
Looks like this is more about the instructions being wrong than a blocker bug itself? |
I was able to get linkerd shell completion to work on oh-my-zsh on macOS (10.15) by:
But what really got it working was changing all the lines in the
to
With the Indeed, it looks to be an issue with
Unfortunately, the changes in spf13/cobra#1070 still haven't been released. So... looks like we just have to wait for a new release of |
@aisrael good investigation 👍 Cobra's releases are taking ages, so for now I'd vote for getting rid of the brackets. Would you be up for a PR? 😉 |
Any updates on this issue? Is really noone using zsh completion? I'm trying out linkerd the first time and using oh-my-zsh as well (Linux). Still doesnt work. At least someone have a ready regexp for replacing the broken brackets on the fly? I will workround for now doing it manually. My workaround does replace all the mentioned [$LINKERD_NAMESPACE] with [$LINKERD_NAMESPACE] but it still does not work as proposed by @aisrael This is my complete fix that doesn't fix it unfortunately :/
Another update ... it does work. Just sourcing the above files is NOT sufficient. Whoever encounters this: You need to restart the shell completely (actually I don't know why, probably a oh-my-zsh thing) |
simple |
We've been patiently waiting for the upstream fixes, but if there are workarounds we can apply within Linkerd, we'd love a PR. |
Signed-off-by: jpiraguha <jiraguha@gmail.com>
As I proposed, "simple ()" should work fine... PR 👆 |
Signed-off-by: jpiraguha <jiraguha@gmail.com>
Bug Report
The
linkerd completion
command does not work as expected on zsh.What is the issue?
The completion scripts are generated, but sourcing them does not provide shell completion. Not sure if this error is restricted to only zsh.
How can it be reproduced?
Run:
Completion does not work
Logs, error output, etc
(If the output is long, please create a gist and
paste the link here.)
linkerd check
outputEnvironment
Possible solution
Additional context
Could be an issue with cobra completion script generator. Check spf13/cobra#881
The text was updated successfully, but these errors were encountered: