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

Problems with zsh? #1

Closed
ngryman opened this issue Feb 25, 2016 · 5 comments
Closed

Problems with zsh? #1

ngryman opened this issue Feb 25, 2016 · 5 comments

Comments

@ngryman
Copy link

ngryman commented Feb 25, 2016

Hey,

Me again, it seems that there are some problems with zsh:

image

Do you have an idea?

@shannonmoeller
Copy link
Owner

I'll take a look. bash and zsh handle completion differently so I'm not surprised.

@ngryman
Copy link
Author

ngryman commented Feb 25, 2016

Here is an example from bd: https://github.com/vigneshwaranr/bd/blob/master/bash_completion.d/bd.
They are bundling it separately, which I find kind of lame.

To quickfix this, you could simply detect that complete is available or that the user is using bash and enable it if so, else disable it. I'm not a shell specialist so I don't know if it's simple to do.
Then you could add zsh auto-complete I guess :)

@shannonmoeller
Copy link
Owner

I've got experimental zsh support in place on the develop branch. Mind giving it a whirl?

@shannonmoeller
Copy link
Owner

The error was due to zsh arrays being 1-base while bash arrays are 0-base, so I had to implement a lookup method. Got completion (mostly) working by using the magic if statement at the bottom of this example:

nategood/commando#24 (comment)

@shannonmoeller
Copy link
Owner

Been using it for a day and all seems well.

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