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

refs #225: add support for ZSH completion #233

Merged
merged 1 commit into from
Nov 26, 2018

Conversation

mavimo
Copy link
Collaborator

@mavimo mavimo commented Nov 25, 2018

Closes #225

@jcassee I added support for ZSH completion, can you check if it work as expected? Thanks!

Signed-off-by: Marco Vito Moscaritolo <mavimo@gmail.com>
@mavimo mavimo added the enhancement New feature or request label Nov 25, 2018
@mavimo mavimo self-assigned this Nov 25, 2018
@mavimo mavimo requested a review from xetys November 25, 2018 15:13
@jcassee
Copy link

jcassee commented Nov 25, 2018

@mavimo Thanks for picking up my feature request!

I'm seeing an error when I run the commend:

$ source <(hetzner-kube completion zsh)
_arguments:comparguments:319: can only be called from completion function
_arguments:comparguments:319: can only be called from completion function

(zsh 5.4.2 (x86_64-ubuntu-linux-gnu) on Ubuntu 18.04)

@mavimo
Copy link
Collaborator Author

mavimo commented Nov 25, 2018

@jcassee I'm not a ZSH user so it's a bit hard to me to investigate and debug it, can you take a look to the discussion reported in gopasspw/gopass#585 and indicate me if you can find some solution (so I can update the readme on this PR)? Thx!!

@jcassee
Copy link

jcassee commented Nov 26, 2018

Ah, it's a completion file, not something that can be sourced. I am not sure how to convert it, but this worked:

mkdir ~/.zcomp
fpath=($HOME/.zcomp $fpath)
hetzner-kube completion zsh > ~/.zcomp/_hetzner-kube
rm -f ~/.zcompdump
compinit

This might be good enough?

Edit: fixed commands.

@mavimo
Copy link
Collaborator Author

mavimo commented Nov 26, 2018

@jcassee thx!! 🎉

@jcassee
Copy link

jcassee commented Nov 26, 2018

@mavimo Thank you for the PR.

I see copied the wrong piece of command line history. Fixed it now.

@xetys
Copy link
Owner

xetys commented Nov 26, 2018

LGTM

@xetys xetys merged commit f261e3e into xetys:master Nov 26, 2018
@mavimo
Copy link
Collaborator Author

mavimo commented Nov 26, 2018

@xetys hemm.. i need to fix the docs 😄

I'll open a new PR asap

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants