我一直在MacOS Monterey上使用Powerlevel 10k和Zsh。
现在我刚刚为MacOS安装了Anaconda,每当我在终端iTerm中打开一个新标签时,我都会收到以下消息:
[WARNING]: Console output during zsh initialization detected.
When using Powerlevel10k with instant prompt, console output during zsh
initialization may indicate issues.
You can:
- Recommended: Change ~/.zshrc so that it does not perform console I/O
after the instant prompt preamble. See the link below for details.
* You will not see this error message again.
* Zsh will start quickly and prompt will update smoothly.
- Suppress this warning either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=quiet
* You will not see this error message again.
* Zsh will start quickly but prompt will jump down after initialization.
- Disable instant prompt either by running p10k configure or by manually
defining the following parameter:
typeset -g POWERLEVEL9K_INSTANT_PROMPT=off
* You will not see this error message again.
* Zsh will start slowly.
- Do nothing.
* You will see this error message every time you start zsh.
* Zsh will start quickly but prompt will jump down after initialization.
For details, see:
https://github.com/romkatv/powerlevel10k/blob/master/README.md#instant-prompt
-- console output produced during zsh initialization follows --
(eval):13: unmatched "
我试过:
conda config --set changeps1 false
但它没有起作用。
我该如何修复它?
完全解决
正如在这个reddit帖子中所说,我已经尝试过:
打开.zsh配置:
❯ nvim ~/.zshrc
在文件的顶部,添加以下行:
export CONDA_AUTO_ACTIVATE_BASE=false
然后重新加载zsh配置:
source ~/.zshrc
它似乎起作用
我收到了同样的警告,因为在我的文件中"~/。zshrc">
在我的最后一行:
# Load Angular CLI autocompletion.
source <(ng completion script)
在我删除它后,警告已经消失,希望它能帮助你