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 completion #178

Closed
grota opened this issue Feb 8, 2013 · 16 comments
Closed

zsh completion #178

grota opened this issue Feb 8, 2013 · 16 comments
Labels

Comments

@grota
Copy link

grota commented Feb 8, 2013

Hi there,
just today I started out using zsh, and I also started porting my config from bash to zsh. I managed to have the j alias defined, but not the autocompletion.
I can see for bash the settings for autojump completion here https://github.com/joelthelion/autojump/blob/master/bin/autojump.bash#L13 but I cannot see any zsh specific settings for autocompletion in here https://github.com/joelthelion/autojump/blob/master/bin/autojump.zsh
Is this a bug or am I doing it wrong?

@wting
Copy link
Owner

wting commented Feb 8, 2013

Sorry it's kind of buried in the documentation, but zsh autocompletion requires additional configuration.

@grota
Copy link
Author

grota commented Feb 8, 2013

I added that but j<space><tab><tab> only completes the filenames in current dir

@wting
Copy link
Owner

wting commented Feb 8, 2013

It may be a bug. I don't have time right now but I'll look into it further when I can.

@grota
Copy link
Author

grota commented Feb 8, 2013

cool, thanks

@backes
Copy link

backes commented Feb 11, 2013

Same issue here, on Mac 10.7.5 running zsh 4.3.11. I can't get autocompletion working. I tried using the oh-my-zsh plugin, and a plain manual installation. I also tried putting ~/.autojump/bin on the path. Nothing helped.
Autojump itself works (e.g. "j src"), but tab-completion does not. It just shows the files of the current directory.

Anyway, let me express my deep gratitude for all your development work! I very much would have liked to come up with a solution rather than just a complaint, but I were not able to fix this...

@wting wting closed this as completed in 0dc77df Feb 11, 2013
@wting
Copy link
Owner

wting commented Feb 11, 2013

You need to add the autoload -U compinit && compinit line after loading autojump to get zsh tab completion working.

@backes
Copy link

backes commented Feb 11, 2013

Thanks for investigation, but this does not seem to make a difference for me. I removed all other entries from .zshrc, .zshenv and .zprofile, to get a plain zsh, and then run source .autojump/etc/profile.d/autojump.zsh and autoload -U compinit && compinit. Still the same behaviour: autojump works, but no tab completion.

grota, can you test on your machine?

@wting wting reopened this Feb 11, 2013
@grota
Copy link
Author

grota commented Feb 11, 2013

Sure, I'll try later, but IIRC I tried launching that command from the prompt and it didn't work. I'll post the confirmation later.

@grota
Copy link
Author

grota commented Feb 11, 2013

Confirmed, it doesn't work. @wting is it possible that the autocomplete functionality was implemented by the _j file that was recently deleted?

@wting
Copy link
Owner

wting commented Feb 11, 2013

Possibly, but when I rolled back and installed that version I didn't get tab completion back.

@wting wting closed this as completed Feb 11, 2013
@wting wting reopened this Feb 11, 2013
@backes
Copy link

backes commented Feb 12, 2013

I just updated my zsh from version 4.3.11 (preinstalled) to 5.0.2 (via macports). In that version, everything works as expected. So maybe we should just add this hint somewhere and leave it at that?

@grota
Copy link
Author

grota commented Feb 12, 2013

I just compiled, installed and run zsh 5.0.0 from source but I didn't get the autocomplete

@wting wting closed this as completed in 17d31d8 Feb 13, 2013
@wting
Copy link
Owner

wting commented Feb 13, 2013

Ok, it should work for sure now. T_T

@grota
Copy link
Author

grota commented Feb 14, 2013

yep, thanks!

@praus
Copy link

praus commented May 20, 2013

I had the same problem described here with zsh 5.0.0 (from Ubuntu 12.10), tried the solution with adding compinit. But I also needed to add ~/.autojump to fpath to get the completion working:

fpath=( ~/.autojump "${fpath[@]}" ) # do before sourcing autojump

@lhotari
Copy link

lhotari commented Jan 31, 2014

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

No branches or pull requests

5 participants