This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: How to set the prompt?


Leonardo Pedrosa wrote:

> Hello, I'm starting with the cygwin recently and cause my lack of
> experience I have this basic/fool question.
> When a I run Cygnus form Windows98 the prompt stay fixed at BASH.EXE
> 2.02$
> How can I set it like the "prompt $p$g" command of MS-DOS ?
>
> Thank you.
> Leonard
>
> --
> Want to unsubscribe from this list?
> Send a message to cygwin-unsubscribe@sourceware.cygnus.com

I have the following in my .bashrc file.

export PS1="[\h:\w]$ "

This sets the first prompt to the computers hostname followed by the
working directory.  All this is surrounded by square brackets and a
dollar symbol.  This is similar to the RedHat linux prompt.  The "\h"
means host and the "\w" means working directory.  You need to get some
bash documentation.  "man bash" should do it if you have a linux machine
or the documenation stuff installed for your cygwin environment.

If your HOME variable is not set you will probably need to type "source
.bashrc".
Just try export PS1="[\w]$ " at the command prompt to test it.

Brendan Simon.



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]