开发者

Set Win-Bash Prompt to Current Directory?

How can I make th开发者_JAVA百科e Win-Bash prompt always print the current folder?

I want it to display something like:

MyPC /Data/MyFiles # _

(assuming I'm in the folder /Data/MyFiles) whereas right now, it always displays

bash$ _

no matter what folder I'm in.


You should be able to set your prompt like this:

PS1="\w\$ "

and put that in your ~/.bashrc file.

Win-Bash apparently uses a very old version of Bash, so it's going to be somewhat limited.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜