我已经安装了Powershell的Posh-Git模块,最近我也安装了Anaconda,并运行了conda init
。显然,这将修改profile.ps1
文件,添加以下代码:
#region conda initialize
# !! Contents within this block are managed by 'conda init' !!
(& "{User}\anaconda3\Scripts\conda.exe" "shell.powershell" "hook") | Out-String | Invoke-Expression
#endregion
这让我可以看到我正在使用的conda环境,但也隐藏了我正在使用的Git分支。如何修改此设置以便同时查看两者?
env_prompt
配置变量。使用conda config --describe env_prompt
命令查看文档。 - mervconda init
中使用的脚本正在拦截posh-git的输出,但我不确定。 - Woody1193