git-bash - 关于gitbash一直报:sh: __git_ps1: command not found的解决办法
滿天的星座
滿天的星座 2017-05-02 09:36:06
0
1
1038

在使用set命令设置docker的环境变量,
然后gitbash一直报sh: __git_ps1: command not found

搜索了一番,并没有相似的解决办法。

滿天的星座
滿天的星座

reply all(1)
左手右手慢动作

If you find inspiration on stackoverflow, just go gitbash的安装目录Gitetc搜寻了一番,找到了如下文件:
bash.bashrc

There is such a line in it

# Set a default prompt of: user@host, MSYSTEM variable, and current_directory
# PS1='\[\e]0;\w\a\]\n\[\e[32m\]\u@\h \[\e[35m\]$MSYSTEM\[\e[0m\] \[\e[33m\]\w\[\e[0m\]\n$ '

I removed the # in front of PS1 and then entered sh, and no error was reported

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!