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

ZSH _complete_goto_aliases autocomplete error #7

Closed
TheOffender opened this issue Mar 6, 2018 · 6 comments
Closed

ZSH _complete_goto_aliases autocomplete error #7

TheOffender opened this issue Mar 6, 2018 · 6 comments
Labels
help wanted 🙏 Extra attention is needed zsh ⚡ Issues related to zsh support

Comments

@TheOffender
Copy link

OSX 10.11

bash --version

GNU bash, version 4.4.19(1)-release (x86_64-apple-darwin15.6.0)

zsh --version

zsh 5.0.8 (x86_64-apple-darwin15.0)

When using bash, works great. When using ZSH, however, it returns the error. I can register and list entries, and can manually type the whole registered alias. When tab completing registered aliases, it returns the following error:

~ goto -l
git /Users/'username'/GIT
~ goto _complete_goto_aliases:local:4: not valid in this context: git /Users/'username'/GIT)
_complete_goto_aliases:local:4: not valid in this context: git /Users/'username'/GIT)
_complete_goto_aliases:local:4: not valid in this context: git /Users/'username'/GIT)
goto

I know that ZSH substitution is different than bash, but haven't been able to pin down exactly what part of the _complete_goto_aliases function is not substituting correctly

Great tool!

@iridakos iridakos added the zsh ⚡ Issues related to zsh support label Mar 6, 2018
@iridakos
Copy link
Owner

iridakos commented Mar 6, 2018

Thanks for reporting! I will also add an item to test in zsh also in the TODO section of the README file.

@caanaan
Copy link

caanaan commented Mar 6, 2018

FYI - had to enable bash completion script compatibility mode to handle the 'compete' command for me.

autoload bashcompinit                                                                                                                                                                                    
bashcompinit

Having a similar issue with tab completion in ZSH with partial completions
zsh 5.0.2 (x86_64-pc-linux-gnu)

goto d
_complete_goto_aliases:13: bad substitution

Agree -- very helpful!

@iridakos
Copy link
Owner

iridakos commented Mar 6, 2018

@caanaan Thank you! I will try to fix that even though I'm not that familiar with zsh 🤞

@ljmf00
Copy link

ljmf00 commented Mar 6, 2018

trying to autocomplete a wrong word using zsh version 5.4.2 (x86_64-pc-linux-gnu)
image

@iridakos
Copy link
Owner

iridakos commented Mar 6, 2018

From a quick look at zsh, I get the feeling that the script has to be re-written for zsh in its own file since the completion mechanism is very different from Bash's. git does the same for its completion scripts.

It won't happen soon, at least by me cause I have to familiarize myself with zsh first.

Adding the help wanted label.

@iridakos iridakos added the help wanted 🙏 Extra attention is needed label Mar 6, 2018
@iridakos iridakos changed the title ZSH _complet_goto_aliasas autocomplete error ZSH _complete_goto_aliases autocomplete error Mar 6, 2018
iridakos added a commit that referenced this issue Mar 6, 2018
@iridakos
Copy link
Owner

Completion now is supported!

@jshort Just checked the functionality on zsh and it's great 👍 👍 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted 🙏 Extra attention is needed zsh ⚡ Issues related to zsh support
Projects
None yet
Development

No branches or pull requests

4 participants