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

j doesn't always auto-complete w/zsh 4.3.10 #13

Closed
jaylevitt opened this issue Jul 27, 2010 · 7 comments
Closed

j doesn't always auto-complete w/zsh 4.3.10 #13

jaylevitt opened this issue Jul 27, 2010 · 7 comments

Comments

@jaylevitt
Copy link

I can't quite figure out the pattern, but typing "j partofpath" doesn't usually autocomplete for me. For example:

% jumpstat
...
73.0:   /Users/jay/src/merge_versions

% j merge_ver<TAB>
No matches: `file' or `corrections'

% j merge_ver<ENTER>
/Users/jay/src/merge_versions

I do have a few dozen completion-related lines in my .zshrc.d; autojump.zsh executes after these. (I tried commenting them all out, but then completion didn't work at all, and I don't remember enough zsh to recreate a normal environment.)

zstyle ':completion:*:messages' format %d
zstyle ':completion:*:warnings' format 'No matches: %d'
zstyle ':completion:*:descriptions' format %B%d%b
zstyle ':completion:*' auto-description 'specify: %d'
zstyle ':completion:*' verbose yes
zstyle ':completion:*' list-separator '#'
zstyle ':completion:*:default' list-prompt '%S%M matches%s'
zstyle ':completion:*:default' menu 'select=0'
zstyle ':completion:*:windows' menu on=0
zstyle ':completion:::::' completer _expand _complete _ignored _approximate
zstyle ':completion:*:expand:*' tag-order all-expansions
zstyle ':completion:*:approximate:*' max-errors 1 numeric
zstyle ':completion:*:corrections' format '%B%d (errors: %e)%b'
zstyle ':completion:*' group-name ''
@jaylevitt
Copy link
Author

Just verified that even with all those commented out, the problem still occurs (without the "No matches:" warning).

@joelthelion
Copy link
Collaborator

I'd love to help you out, but I use bash myself and zsh completion works perfectly on all of my machines...

Is autojump the only application that has a problem? What distro are you using? Can you try using autojump on a fresh user account to see if one of your customizations could be the problem?

@jaylevitt
Copy link
Author

Hmm.. I'm on Mac OS X 10.5.8 (can't upgrade to 10.6 yet), with zsh 4.3.10 from MacPorts. I tried using the built-in 4.3.4, got the same results, even after deleting all my customizations and blowing away the autojump directory.

I just tried creating a new account that uses /bin/bash (3.2.17(1)-release (i386-apple-darwin9.0)), but install.sh says:

grep: /Users/jaytest/.bash_profile: No such file or directory
./install.sh: line 79: [: too many arguments

I did, in fact, touch an empty .bash_profile but that didn't change the error message. How can I troubleshoot?

@jaylevitt
Copy link
Author

Well, ignoring the bash installer bug, I think I figured out the zsh problem. With zsh 4.3.10:

% echo $FPATH
/opt/local/share/zsh/site-functions:/opt/local/share/zsh/4.3.10/functions

install.zsh puts _j into the first directory in $FPATH. Unfortunately:

~% ls /opt/local/share/zsh
4.3.10/
~% 

and install.zsh doesn't check the error! I'd recommend that install.zsh make the directory if required, or at least spit out an error when it isn't found. I manually created site-functions, put _j in there, and all is now well on the zsh side.

@joelthelion
Copy link
Collaborator

Could you provide a patch for the zsh installer? I could probably do it, but since I don't use zsh, there's a significant probability that I would mess up :)

About the bash installer, I guess the problem is in a patch from another guy I merged in recently. But I can't reproduce the problem on my computer...

@joelthelion
Copy link
Collaborator

Ok, I think I've solved the problem. What do you think of the solution?

http://github.com/joelthelion/autojump/commit/512db419e1470af77c544ecbedad5dae9221ddda

@joelthelion
Copy link
Collaborator

Ok, I'm considering the issue to be closed. Don't hesitate to reopen if that is not the case!

This issue was closed.
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