开发者

Set Win-Bash Prompt to Current Directory?

开发者 https://www.devze.com 2023-02-16 06:59 出处:网络
How can I make th开发者_JAVA百科e Win-Bash prompt always print the current folder? I want it to display something like:

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

精彩评论

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