【发布时间】:2017-01-28 18:52:14
【问题描述】:
所以我最近重新映像了我的机器,并且在我的新 PyCharm 安装中发生了一些奇怪的事情。
首先,我在 bash_profile 中使用了 PS1 定义
PS1='\n\n\e[1;34mLOCAL: \@ $PWD \n\n\e[0;30m'
它以不同颜色打印出时间和当前工作目录,以便我轻松浏览输出。
在常规终端中,这使我的命令行如下所示:
LOCAL: 12:01 PM /Users/me
ls
Applications Pictures
Desktop Public
Library anaconda
但是,在 PyCharm 中,控制台也会打印出我的解释器路径:
(/Users/me/anaconda)
LOCAL: 12:01 PM /Users/me
ls
Applications Pictures
Desktop Public
Library anaconda
我可以通过关闭 virtualenv 激活来单独关闭每个项目,但是,如果我尝试使用向上箭头循环浏览历史记录,则该行不会完全清除。
LOCAL: 12:01 PM /Users/me
echo "this is prior to hitting up arrow"
this is prior to hitting up arrow
(/Users/me/anaconda)
LOCAL: 12:01 PM /Users/me
echo "techo "after hitting the up arrow twice, this line is prepended by 'echo t'"
after hitting the up arrow twice, this line is prepended by 'echo t'
知道是什么导致了这种行为,以及如何让 PyCharm 的控制台在我的所有项目中都像常规终端一样工作?
【问题讨论】:
标签: pycharm