有哪位能治一下我的手贱,不小心把zsh配置搞坏了

我刚刚装minconda3的时候需要export PATH,但是那个博主写错命令了,写成 export PATH="/home/gaoxiang/miniconda3/bin:"$PATH":"加错了


我把这个命令加到~/.bashrc
然后我又手贱source ~/.bashrc,先是出来一堆错误

.bashrc:16: command not found: shopt
.bashrc:24: command not found: shopt
.bashrc:111: command not found: shopt
/usr/share/bash-completion/bash_completion:45: command not found: shopt
/usr/share/bash-completion/bash_completion:53: command not found: complete
/usr/share/bash-completion/bash_completion:56: command not found: complete
/usr/share/bash-completion/bash_completion:59: command not found: complete
/usr/share/bash-completion/bash_completion:62: command not found: complete
/usr/share/bash-completion/bash_completion:65: command not found: complete
/usr/share/bash-completion/bash_completion:68: command not found: complete
/usr/share/bash-completion/bash_completion:71: command not found: complete
/usr/share/bash-completion/bash_completion:74: command not found: complete
/usr/share/bash-completion/bash_completion:77: command not found: complete
/usr/share/bash-completion/bash_completion:80: command not found: complete
/usr/share/bash-completion/bash_completion:1461: parse error near `|'
\[\e]0;\[email protected]\h: \w\a\]\[\033[01;32m\]\[email protected]\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]$ 

意识到出错后退出,重启,在不改写任何文件的情况下,zsh变成了

(base) ➜  ~ 

这个(base)我不知道哪来的,就算我按了source .zshrc也没什么用
求助

你把那个配置的环境变量删了,在试试看看能还原吗?

base 一般就是指激活了 conda,你看看 zsh 里面有没有 conda initialize 那一段(conda 加上的)

这位老兄一说,我想起来了,在安装miniconda的时候,确实会提示是否打开shell就自动进入conda的base虚拟环境。如果你不小心按了确认就会出现你这种情况

我把miniconda3的文件删掉了,恢复了