首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >MacOS Anaconda使用Zsh在PowerLevel10k上引发警告消息

MacOS Anaconda使用Zsh在PowerLevel10k上引发警告消息
EN

Stack Overflow用户
提问于 2022-08-13 20:31:34
回答 1查看 664关注 0票数 1

我在MacOS蒙特利的Zsh上使用了PowerLevel10k。

现在我已经为MacOS安装了Anaconda,每当我在终端iTerm中打开一个新的选项卡时,我都会得到以下消息:

代码语言:javascript
运行
复制
[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 "

我试过:

代码语言:javascript
运行
复制
conda config --set changeps1 false

但没起作用。

我该怎么解决呢?

自主解决了

正如这个红边线中所述,我尝试过:

打开.zsh配置:

代码语言:javascript
运行
复制
❯ nvim ~/.zshrc

在文件的顶部,添加以下行:

代码语言:javascript
运行
复制
export CONDA_AUTO_ACTIVATE_BASE=false

然后重新加载zsh配置:

代码语言:javascript
运行
复制
source ~/.zshrc

它似乎起作用了

EN

回答 1

Stack Overflow用户

发布于 2022-11-21 15:44:16

我也有同样的警告,因为在我的文件“~/..zshrc”

在最后一行我有:

代码语言:javascript
运行
复制
# Load Angular CLI autocompletion.
source <(ng completion script)

当我移除警告后,希望它能对你有所帮助。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/73347462

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档