How do I set promt format

Started by
1 comment, last by akira32 16 years, 1 month ago
I use the cygwin's bash. My default prompt is $. How do I change the prompt as current directory with my user name? default $ I want $/home/user:myname:
akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32
Advertisement
You need to set the environment variable PS1 to "$\w:\u: ". You can do this temporarily by writing "export PS1='$\w:\u: '" in the shell and hitting return. Cygwin should have a bash.bashrc file somewhere or a user local ~/.bashrc where you can replace the PS1 setting more permanently.
Thank you,Null and Void!


akira32 編程之家 Yahoohttp://tw.myblog.yahoo.com/akira32-akira32

This topic is closed to new replies.

Advertisement