Subject: Re: How to set the prompt?
From: Brendan Simon <[email-masked]>
To: Leonardo Pedrosa <[email-masked]>
Cc: [email-masked]
Date: Mon, 20 Sep 1999 10:50:19 +1000

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 [email-masked]

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 [email-masked]