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.
精彩评论