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

completion for file args doesn't happen if I use antigen apply #89

Closed
matschaffer opened this issue Sep 22, 2014 · 6 comments
Closed

completion for file args doesn't happen if I use antigen apply #89

matschaffer opened this issue Sep 22, 2014 · 6 comments

Comments

@matschaffer
Copy link

I'm using antigen bundles to list a set of bundles, then I was calling antigen apply afterwards.

Not sure this is required since bundles still seem to load if I remove that call. And oddly enough it also makes completion for file name arguments work again.

To clarify, with this setup, I can tab-complete local file paths:

source "$HOME/.antigen/antigen/antigen.zsh"

antigen bundles <<EOBUNDLES
  zsh-users/zsh-syntax-highlighting

  sindresorhus/pure

  matschaffer/zsh-matschaffer
EOBUNDLES

But if I add the apply step, I can't tab-complete local file paths:

source "$HOME/.antigen/antigen/antigen.zsh"

antigen bundles <<EOBUNDLES
  zsh-users/zsh-syntax-highlighting

  sindresorhus/pure

  matschaffer/zsh-matschaffer
EOBUNDLES

antigen apply

Is this expected?

@matschaffer
Copy link
Author

Ah... looks like the apply lets things like git completions work, but breaks local file completions. At least for commands I don't have plugins for (e.g., dpkg).

Is there a way to get it to default to local file paths?

@sharat87
Copy link
Member

That's odd. Things like the ls and file commands do have local file paths completion at my end. Could you test to find if its a particular plugin that's causing this? Also, is this issue present when you were not using antigen?

@matschaffer
Copy link
Author

ls works. It's stuff that's a little outside normal (like dpkg that I mentioned, I'm on an OS X host using dpkg to examine build results). Here's what happens if I have a blank zshrc and start adding antigen components manually:

localhost% dpkg workspace/                        # tab completed
localhost% source "$HOME/.antigen/antigen/antigen.zsh"
localhost% dpkg workspace/                        # tab completed
localhost% antigen apply
localhost% dpkg wo                        # won't tab complete

@matschaffer
Copy link
Author

Btw, I think I found what's causing this. I don't think it's antigen but rather what zsh does once antigen makes everything context aware. This post has details on how to set up an alternate key press for file based completion regardless of command context.

@clinta
Copy link

clinta commented Jan 18, 2015

I want to reopen this because I'm seeing the same thing, but it's affecting ls and cd commands for me. I'm running antigen on zsh 5.0.6 on cygwin.

localhost% ls dotfiles                                       #Tab complete works
localhost% source antigen/antigen.zsh
localhost% ls dotfiles                                      #Tab complete still works
localhost% antigen apply
localhost% ls dot                                            #Tab complete doesn't work anymore

This is without any plugins loaded at all, just running apply breaks tab completion.

@clinta
Copy link

clinta commented Jan 18, 2015

Nevermind, this was a cygwin issue, solved by doing this:

http://blog.en.edaro.net/2014/01/fix-broken-autocompletion-with-zsh-in.html

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

3 participants