public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
* How to set the prompt?
@ 1999-09-19 10:39 Leonardo Pedrosa
  1999-09-19 12:53 ` Doug Wyatt
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Leonardo Pedrosa @ 1999-09-19 10:39 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set the prompt?
  1999-09-19 10:39 How to set the prompt? Leonardo Pedrosa
@ 1999-09-19 12:53 ` Doug Wyatt
  1999-09-30 23:42   ` Doug Wyatt
  1999-09-19 17:51 ` Brendan Simon
  1999-09-30 23:42 ` Leonardo Pedrosa
  2 siblings, 1 reply; 6+ messages in thread
From: Doug Wyatt @ 1999-09-19 12:53 UTC (permalink / raw)
  To: cygwin

Date sent:      	Fri, 19 Sep 1997 14:35:20 -0300
From:           	Leonardo Pedrosa <lion@sti.com.br>
To:             	cygwin@sourceware.cygnus.com
Subject:        	How to set the prompt?

I would recommend getting a copy of the Bash manual and reading
about "Prompting".  The shell variable which controls the initial
interactive session prompt is 'PS1'.  For other interactive states
there are 3 others, PS2, PS3 and PS4.  The manual tells you what
special values you may use for them.

There are many other good reasons to read the Bash manual, too.

Regards,
Doug


> 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
> 



==========================================================
Doug Wyatt                    E-Mail: dwyatt@sunflower.com
Sys Admin                      Phone: 785-843-4099
Kohlman Systems Research, Inc.   Fax: 785-843-6459
319 Perry St., Lawrence, KS  66044  USA

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set the prompt?
  1999-09-19 10:39 How to set the prompt? Leonardo Pedrosa
  1999-09-19 12:53 ` Doug Wyatt
@ 1999-09-19 17:51 ` Brendan Simon
  1999-09-30 23:42   ` Brendan Simon
  1999-09-30 23:42 ` Leonardo Pedrosa
  2 siblings, 1 reply; 6+ messages in thread
From: Brendan Simon @ 1999-09-19 17:51 UTC (permalink / raw)
  To: Leonardo Pedrosa; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* How to set the prompt?
  1999-09-19 10:39 How to set the prompt? Leonardo Pedrosa
  1999-09-19 12:53 ` Doug Wyatt
  1999-09-19 17:51 ` Brendan Simon
@ 1999-09-30 23:42 ` Leonardo Pedrosa
  2 siblings, 0 replies; 6+ messages in thread
From: Leonardo Pedrosa @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set the prompt?
  1999-09-19 12:53 ` Doug Wyatt
@ 1999-09-30 23:42   ` Doug Wyatt
  0 siblings, 0 replies; 6+ messages in thread
From: Doug Wyatt @ 1999-09-30 23:42 UTC (permalink / raw)
  To: cygwin

Date sent:      	Fri, 19 Sep 1997 14:35:20 -0300
From:           	Leonardo Pedrosa <lion@sti.com.br>
To:             	cygwin@sourceware.cygnus.com
Subject:        	How to set the prompt?

I would recommend getting a copy of the Bash manual and reading
about "Prompting".  The shell variable which controls the initial
interactive session prompt is 'PS1'.  For other interactive states
there are 3 others, PS2, PS3 and PS4.  The manual tells you what
special values you may use for them.

There are many other good reasons to read the Bash manual, too.

Regards,
Doug


> 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
> 



==========================================================
Doug Wyatt                    E-Mail: dwyatt@sunflower.com
Sys Admin                      Phone: 785-843-4099
Kohlman Systems Research, Inc.   Fax: 785-843-6459
319 Perry St., Lawrence, KS  66044  USA

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: How to set the prompt?
  1999-09-19 17:51 ` Brendan Simon
@ 1999-09-30 23:42   ` Brendan Simon
  0 siblings, 0 replies; 6+ messages in thread
From: Brendan Simon @ 1999-09-30 23:42 UTC (permalink / raw)
  To: Leonardo Pedrosa; +Cc: cygwin

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~1999-09-30 23:42 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-09-19 10:39 How to set the prompt? Leonardo Pedrosa
1999-09-19 12:53 ` Doug Wyatt
1999-09-30 23:42   ` Doug Wyatt
1999-09-19 17:51 ` Brendan Simon
1999-09-30 23:42   ` Brendan Simon
1999-09-30 23:42 ` Leonardo Pedrosa

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).