ruby ZSH 抱怨 RVM __rvm_cleanse_variables:找不到函数定义文件
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/10585002/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
ZSH complains about RVM __rvm_cleanse_variables: function definition file not found
提问by Tyler Brock
When using the latest ZSH and RVM on Mac OS X 10.7.4 ZSH complains about this:
在 Mac OS X 10.7.4 上使用最新的 ZSH 和 RVM 时,ZSH 会抱怨这个:
__rvm_cleanse_variables: function definition file not found
__rvm_cleanse_variables: function definition file not found
回答by Tyler Brock
Running the following solved the problem:
运行以下解决了问题:
rm -f ~/.zcompdump*
rm -f ~/.zcompdump*
Note: The * is incase there are multiple .zcompdump files.
注意:* 表示存在多个 .zcompdump 文件。
回答by heracek
Sometime there is also ~/.zcompdump-<COMPUTER NAME>-<VERSION>file, so use:
有时也有~/.zcompdump-<COMPUTER NAME>-<VERSION>文件,所以使用:
rm -f ~/.zcompdump*
回答by nomad
To disable the .zcompdump*file(s), you could look in your .zshrc(or /etc/zsh/* files) for compinitand add the -Dflag.
要禁用.zcompdump*文件,您可以在您的.zshrc(或/etc/zsh/* files)中查找compinit并添加-D标志。
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)
(来源:http: //www.csse.uwa.edu.au/programming/linux/zsh-doc/zsh_23.html)
回答by Andrew Prentice
My problem persisted even after the compinit -Dand rm -f ~/.zcompdump*. I found this github issueand 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.
即使在compinit -D和之后,我的问题仍然存在rm -f ~/.zcompdump*。我发现了这个 github 问题并检查了我的 .zplug 目录,果然找到了一些非隐藏的 zcompdump 文件(没有前面的“.”)。删除了那些,我很高兴。如果您使用 zsh 插件管理器,如 zgen 或 zplug,请检查它们的目录。
回答by hanetzer
Add rm -f ~/.zcompdump{,.zwc} to .zlogin to automate it
将 rm -f ~/.zcompdump{,.zwc} 添加到 .zlogin 以使其自动化
回答by Poonkodi
Run this comment
运行此评论
rm -f ~/.zcompdump*

