在家里的 air 上配置zsh开启自动完成插件后出现这个错误
几经尝试找到相应的解决方法,现记录如此,留以备用
rm -f ~/.zcompdump*
为什么会出现此问题呢?
ZSH使用compinit初始化当前会话的完成。为了加快compinit的运行速度,可以让它生成一个转储配置,该配置将在以后的调用中读取。此转储文件与启动文件位于同一目录下的.zcompdump(即$ZDOTDIR
或$HOME
)
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
).
另一种方法:
To disable the
.zcompdump*
file(s), you could look in your.zshrc
(or/etc/zsh/* files
) forcompinit
and add the-D
flag.
This might be better than creating the files and deleting them at every login.
网友评论