171

When using the latest ZSH and RVM on Mac OS X 10.7.4 ZSH complains about this:

__rvm_cleanse_variables: function definition file not found

1
  • This happens in Ubuntu too, after RVM update. @heracek's solution solved the issue. Commented Nov 29, 2013 at 15:00

5 Answers 5

498

Running the following solved the problem:

rm ~/.zcompdump*

Note: The * is incase there are multiple .zcompdump files.

Sign up to request clarification or add additional context in comments.

4 Comments

ZSH uses compinit to initialize completion for the current session. To speed up the running of compinit, it can be made to produce a dumped configuration which will be read in on future invocations. This dumped file is .zcompdump in the same directory as the startup files (i.e. $ZDOTDIR or $HOME).
Boom goes the dynamite.
searched for "whats 'zcompdump' for" while diagnosing the __rvm_cleanse_variables issue... two birds, one search. +1's to everyone.
just as a nitpick seems like you could remove the -f flag, doesn't seem necessary to bypass the remove file confirmation (if the user has it set in the first place)
109

Sometime there is also ~/.zcompdump-<COMPUTER NAME>-<VERSION> file, so use:

 rm -f ~/.zcompdump* 

2 Comments

Cheers, that was my issue :)
Do not forget to open a new shell.
7

To disable the .zcompdump* file(s), you could look in your .zshrc (or /etc/zsh/* files) for compinit and add the -D flag.

This might be better than creating the files and deleting them at every login.

(source: http://www.csse.uwa.edu.au/programming/linux/zsh-doc/zsh_23.html)

1 Comment

But probably .zcompdump files have advantages and by deleting them it has side effects.
4

My problem persisted even after the compinit -D and rm -f ~/.zcompdump*. I found this github issue and checked my .zplug directory and sure enough found some non-hidden zcompdump files (no preceding '.'). Deleted those and I was good to go. If you're using a zsh plugin manager like zgen or zplug, check their directories.

1 Comment

boy u saved day. for me along with ~/.zcomdump*, need to remove ~/.antigen/.zcomdump* too
2

Add rm -f ~/.zcompdump{,.zwc} to .zlogin to automate it

1 Comment

or compinit -D if you don't want caching.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.