6

When I try to autocomplete files (with vim as argument 0):

vim ~/.conf <TAB>

It shows:

_arguments:450: _vim_files: function definition file not found
_arguments:450: _vim_files: function definition file not found
_arguments:450: _vim_files: function definition file not found

It was working fine before!

Other commands:

cat ~/.conf <TAB>

give:

cat ~/.config/

Why is zsh failing only at vim?

6
  • Does it happen under zsh -f and then autoload -U compinit && compinit ?
    – thrig
    May 2 '16 at 16:55
  • No, it's fine then
    – user137998
    May 2 '16 at 16:57
  • It's working even after a source .zshrc.
    – user137998
    May 2 '16 at 17:03
  • 1
    Okay, you get to bisect your zsh configuration to figure out what's breaking it. Removing dreck like oh-my-zsh may help.
    – thrig
    May 2 '16 at 17:04
  • 1
    Yet another "broken by OMZ" question...
    – jasonwryan
    May 2 '16 at 18:10
9

Turns out that removing all ~/.zcompdump files solved it:

rm -r ~/.zcompdump*
1
  • this worked after I also ran exec zsh from James Kokou Gaglo's answer below
    – aberger
    Dec 10 '20 at 16:36
9

This works for me :

rm $ZSH_COMPDUMP && exec zsh

1
  • 1
    This is the correct answer. The "accepted" answer will sometimes also work, but this is the most correct answer. Works every time. :) Jan 27 '18 at 13:55
1

None of these would work for me. My problem was antigen:

rm ~/.antigen/.zcomp*

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy