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

_arguments:448: _vim_files: function definition file not found #518

Closed
juanpabloaj opened this Issue Aug 2, 2011 · 68 comments

Comments

Projects
None yet
@juanpabloaj

juanpabloaj commented Aug 2, 2011

when I try autocomplete a name of file for vim, example I try open .vimrc I get

 $ vim ~/.vim<TAB>
 _arguments:448: _vim_files: function definition file not found
 _arguments:448: _vim_files: function definition file not found
 _arguments:448: _vim_files: function definition file not found
 $ vim ~/.vim
@juanpabloaj

This comment has been minimized.

juanpabloaj commented Aug 16, 2011

a similar problem with

git checkout mas<TAB>......                                                                                        
_git:47: __git_aliases_and_commands: function definition file not found
_git:47: __git_aliases_and_commands: function definition file not found
@BigDSK

This comment has been minimized.

BigDSK commented Sep 7, 2011

janpabloaj: I'm new to zsh and to zcompdump, however this problem seems to resolve by removing (or moving away) your ~/.zcompdump file.

The issue appears not to be directly related to oh-my-zsh.

@juanpabloaj

This comment has been minimized.

juanpabloaj commented Sep 7, 2011

ok, thanks @kellerds

@juanpabloaj juanpabloaj closed this Sep 7, 2011

@amjith

This comment has been minimized.

amjith commented Jan 14, 2012

I disabled the autojump plugin from my oh-my-zsh plugin list and it works fine now. I think there is a problem with the autojump plugin for oh-my-zsh.

@kcorcoran

This comment has been minimized.

kcorcoran commented Jan 24, 2013

I ran into this problem after adding setopt HIST_IGNORE_ALL_DUPS to ~/.zshrc.

removing ~/.zcompdump and restarting all shells fixed it.

@paulcalabro

This comment has been minimized.

Contributor

paulcalabro commented Mar 11, 2013

Removing ~/.zcompdump and restarting all shells fixed it for me as well!

@holys

This comment has been minimized.

holys commented May 13, 2013

Just run exec zsh to solve this.

@stephpy

This comment has been minimized.

stephpy commented Jul 22, 2013

Removing ~/.zcompdump and restarting all shells fixed it for me as well!

Same. Thanks.

@niftylettuce

This comment has been minimized.

niftylettuce commented Aug 28, 2013

thanks for this

@mystfox

This comment has been minimized.

mystfox commented Aug 29, 2013

Well, nice to know I could have found this out easily earlier. I was messing around with zsh modules and eventually created a new user to do it, but when I restarted, I ran into this in all my normal shells. I spent forever trying to figure out how making a new user could have caused this, then I found this, removed my .zcompdump, and new shells work fine.

@luxifer

This comment has been minimized.

luxifer commented Sep 30, 2013

janpabloaj: I'm new to zsh and to zcompdump, however this problem seems to resolve by removing (or moving away) your ~/.zcompdump file.

thx it works

@vvo

This comment has been minimized.

vvo commented Nov 17, 2013

Just run exec zsh to solve this.

This worked fine for me

@miguelbaldi

This comment has been minimized.

miguelbaldi commented Nov 18, 2013

Just run exec zsh to solve this.

Worked like a charm!

@drewlustro

This comment has been minimized.

drewlustro commented Feb 16, 2014

Just run exec zsh to solve this.

whew, thank you @holys !!

@Kakadu

This comment has been minimized.

Kakadu commented Jul 9, 2014

If somebody will be affected by this problem: on my machine I needed to remove file ~/.zcompdump-hostname-5.0.5 instead of ~/.zcompdump

joshbetz added a commit to joshbetz/dotfiles that referenced this issue Aug 27, 2014

@rafmagana

This comment has been minimized.

rafmagana commented Apr 20, 2015

Just run exec zsh to solve this.

This worked for me, thanks, @holys.

@stephanebachelier

This comment has been minimized.

stephanebachelier commented Aug 14, 2015

Thanks !

@tao12345666333

This comment has been minimized.

tao12345666333 commented Aug 21, 2015

Well, thanks! @Kakadu I solved in the same way.

@egoens

This comment has been minimized.

egoens commented Aug 24, 2015

Thanks for the suggestion @Kakadu. This worked for me as well.

@victoryancn

This comment has been minimized.

victoryancn commented Sep 2, 2015

Thanks !@Kakadu, it works!

@Neraste

This comment has been minimized.

Neraste commented Oct 14, 2015

@BigDSK: this solved my problem!

@sishuiliunian

This comment has been minimized.

sishuiliunian commented Dec 5, 2015

it works!

@sishuiliunian

This comment has been minimized.

sishuiliunian commented Dec 5, 2015

rm .zcompdump*
exec zsh

@ergouge

This comment has been minimized.

ergouge commented Dec 9, 2015

Well, thanks a lot! @Kakadu

@cswanghan

This comment has been minimized.

cswanghan commented Dec 16, 2015

rm ~/.zcondump*
exec zsh

works for me.

@hatakawas

This comment has been minimized.

hatakawas commented Dec 17, 2015

rm ~/.zcondump*
exec zsh

Yes!

@meowoodie

This comment has been minimized.

meowoodie commented Jan 3, 2016

thx @kcorcoran , your suggestion is helpful!

@alex-bender

This comment has been minimized.

alex-bender commented Oct 12, 2016

rm ~/.zcondump* 
exec zsh

Doesn't work for me

@troy0820

This comment has been minimized.

troy0820 commented Oct 13, 2016

@alex-bender after you deleted the dump, type zsh in your terminal. That should source the shell and should be fine. That worked for me.

@mcornella

This comment has been minimized.

Collaborator

mcornella commented Oct 13, 2016

@alex-bender it's:

rm ~/.zcompdump* 
exec zsh

You mispelled zcompdump.

@dmdque

This comment has been minimized.

dmdque commented Oct 14, 2016

Anyone care to explain why this happens, and why removing ~/.zcompdump* fixes it?

@nikitavoloboev

This comment has been minimized.

nikitavoloboev commented Oct 20, 2016

I am not using oh my zsh and instead am using prezto.

I have the same issue :

Doing these commands :

rm ~/.zcompdump* 
exec zsh

Doesn't do anything for me. What can I do to fix this issue? Thank you.

@koromicha

This comment has been minimized.

koromicha commented Oct 21, 2016

rm .zcompdump*
exec zsh
this works like a charm,thanks

@bierik

This comment has been minimized.

bierik commented Nov 10, 2016

rm ~/.zcompdump*
exec zsh

Solved my problem. Thx @sishuiliunian

@cyyyu

This comment has been minimized.

cyyyu commented Nov 23, 2016

exec zsh works. Thanks!

@Tonvin

This comment has been minimized.

Tonvin commented Jan 18, 2017

rm ~/.zcompdump*
exec zsh
Thanks very much.

@jamespullar

This comment has been minimized.

jamespullar commented Jan 18, 2017

@ev-agelos
Did you ever resolve your issue with zplug?
#518 (comment)

@ev-agelos

This comment has been minimized.

ev-agelos commented Jan 18, 2017

@jamespullar Well months passed and I am not sure what fixed it, but I dont get the error anymore :|

@tarvos21

This comment has been minimized.

tarvos21 commented Feb 9, 2017

Hi, I have tried the rm ~/.zcompdump*; exec zsh, this works good in terminal, but in tmux, the problem still exists.

@captainvera

This comment has been minimized.

captainvera commented Feb 26, 2017

@jamespullar
This is how I fixed it with neovim 0.1.7 and zplug 2.4.1

rm -rf ~/.zcompdump* 
rm -rf /usr/local/opt/zplug/zcomp* 
exec zsh
@aadshalshihry

This comment has been minimized.

aadshalshihry commented Mar 18, 2017

rm -rf ~/.zcompdump*
exec zsh

if you use tmux, you need to detach, and attach to the session. Then it will work.

@rackstar

This comment has been minimized.

rackstar commented Mar 30, 2017

(for zplug users)
rm ~/.zcompdump*
rm ~/.zplug/zcompdump*
exec zsh

@fedexyz

This comment has been minimized.

fedexyz commented Apr 11, 2017

rm ~/.zcompdump*
exec zsh

did it for me. thanks

@ssteinerx

This comment has been minimized.

ssteinerx commented Apr 27, 2017

Just started having this problem today. No changes I'm aware of.

None of the solutions above have helped.

@iamkarlson

This comment has been minimized.

iamkarlson commented Apr 28, 2017

for antigen users, it's also useful

rm ~/.antigen/.zcompdump*
exec zsh
@ssteinerx

This comment has been minimized.

ssteinerx commented Apr 28, 2017

@iamkarlson That one did it, thanks!

Sure would be handy to know what actually causes this issue and how to prevent/repair it automatically.

@jwhitmarsh

This comment has been minimized.

jwhitmarsh commented May 3, 2017

This works for me, for a day, then I have to rm ~/.antigen/.zcompdump* again - anyone have any idea what is causing this?

@gillchristian

This comment has been minimized.

gillchristian commented Jun 1, 2017

@iamkarlson thanks

rm ~/.antigen/.zcompdump*
exec zsh

that worked for me!

@nikitavoloboev

This comment has been minimized.

nikitavoloboev commented Jun 22, 2017

This happens really often for me for some reason and the fix works but it is still super annoying.

Is there a reason why this happens?

@cbelth

This comment has been minimized.

cbelth commented Jul 18, 2017

I don't know why it happens and I would love to know that. The .zcompdump file appears every time I run exec zsh. I'm guessing something in my .zshrc is causing it. To fix this I added

rm ~/.zcompdump*

to the end of my .zshrc.

@mronfim

This comment has been minimized.

mronfim commented Oct 1, 2017

rm ~/.zcompdump*
rm ~/.zplug/zcompdump
exec zsh

I had to remove zcompdump in both locations to get it to work.

@momozor

This comment has been minimized.

momozor commented Jan 6, 2018

rm $HOME/.zcompdump works. However what caused it in the first place and why vim is affected?

It seems, this issue is still happening to the users since 2011.

@ConstipatedNinja

This comment has been minimized.

ConstipatedNinja commented Jan 11, 2018

For future fellows, here's the simple explanation of why this happens:

When zsh runs, it saves completion data in .zcompdump to make for faster completion later. For those who are on multiple machines regularly with the same homedir exported to those machines, you'll also get .zcompdump-hostname -s-<zsh version number> files.

Since it's saving this data, it's effectively making a snapshot of what's there at that time. If the installed packages change, you can witness cases where the zcompdump data is not just out-of-date but will actually cause errors.

If you have this problem with a single machine in your environment, then you should delete the .zcompdump files specifically for that machine and either run exec zsh or simply log out and back in to have a new .zcompdump file created for that machine specifically. After this, the single machine should behave for any new sessions on that machine.

If you have a problem with many machines in your environment, or if it's something like all but one machine, delete your primary .zcompdump file and all of the host-specific zcompdump files for the problem hosts, and then ssh into one of the machines that was affected. After that, new sessions on any of the affected machines should behave.

@ben1iu

This comment has been minimized.

ben1iu commented Jan 19, 2018

rm ~/.zcondump*
exec zsh

It's works for me.

@TyOverby

This comment has been minimized.

TyOverby commented Apr 4, 2018

How to find all ".zcompdump" files on your computer.

(zsh)

find / 2> /dev/null | grep "\.zcompdump" 
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment