* How to use PS1 so that the current path can be the prompt
@ Bing.Li
` brianls
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Bing.Li @ UTC (permalink / raw)
To: blinux-list; +Cc: Bing Li
Dear all,
How to use PS1 so that the current path can be the prompt? Please give me
help! Thanks,
Bing
_________________
| How are you? |_____ __
| I am Li Bing. | |__| |_________
|________________| OK? |::| | Need /
| \.____|::|__| Help? <
| \::/ \._______\
/\**/\ | ___________________________________
( o_o )_ |__|http://www.public.asu.edu/~libing /
(u--u \_) | |bing.li@asu.edu, 480-829-8492(H) /
(||___ )==\ |480-965-3753(L)602-965-1746(O) \
,dP"/b/=( /P"/b\ |__________________________________\
|8 || 8\=== || 8
`b, ,P `b, ,P
"""` """`
^ permalink raw reply [flat|nested] 5+ messages in thread* How to use PS1 so that the current path can be the prompt
How to use PS1 so that the current path can be the prompt Bing.Li
@ ` brianls
` A. R. Vener
` Massimiliano Perantoni
2 siblings, 0 replies; 5+ messages in thread
From: brianls @ UTC (permalink / raw)
To: blinux-list
I'm pretty sure it depends on the shell you're using. If you're using
sh or bash, try this,
export PS1="\W "
I prefer an extra character after the directory name. My root prompt
looks like:
export PS1="\W> "
And all others use a different character:
export PS1="\W# "
This allows me to know if I'm currently logged in as root or not.
Brian.
>>>>> "Bing" == Bing Li <Bing.Li@asu.edu> writes:
Bing> Dear all, How to use PS1 so that the current path can be the
Bing> prompt? Please give me help! Thanks,
Bing> Bing
Bing> _________________ | How are you? |_____ __ |
Bing> I am Li Bing. | |__| |_________ |________________| OK? |::| |
Bing> Need / | \.____|::|__| Help? < | \::/ \._______\ /\**/\ |
Bing> ___________________________________ ( o_o )_
Bing> |__|http://www.public.asu.edu/~libing / (u--u \_) |
Bing> |bing.li@asu.edu, 480-829-8492(H) / (||___ )==\
Bing> |480-965-3753(L)602-965-1746(O) \ ,dP"/b/=( /P"/b\
Bing> |__________________________________\ |8 || 8\=== || 8 `b, ,P
Bing> `b, ,P """` """`
Bing> --- Send your message for blinux-list to
Bing> blinux-list@redhat.com Blinux software archive at
Bing> ftp://leb.net/pub/blinux Blinux web page at
Bing> http://leb.net/blinux To unsubscribe send mail to
Bing> blinux-list-request@redhat.com with subject line: unsubscribe
--
Brian Sellden
www.henge.com/~brian
What on earth would a man do with himself
if something did not stand in his way?"
-- Orson Wells
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: How to use PS1 so that the current path can be the prompt
How to use PS1 so that the current path can be the prompt Bing.Li
` brianls
@ ` A. R. Vener
` Bing.Li
` Massimiliano Perantoni
2 siblings, 1 reply; 5+ messages in thread
From: A. R. Vener @ UTC (permalink / raw)
To: blinux-list
In ksh this is simple. In your .profile have the line:
export PS1="\$PWD> "
Rudy
> From blinux-list-request@redhat.com Mon Apr 17 00:57:44 2000
> Return-Path: <blinux-list-request@redhat.com>
> Received: from lists.redhat.com (lists.redhat.com [199.183.24.247])
> by cougar.aero-vision.com (8.9.3/8.9.3) with SMTP id AAA25623
> for <salt@aero-vision.com>; Mon, 17 Apr 2000 00:57:44 -0500
> Received: (qmail 28285 invoked by uid 501); 17 Apr 2000 05:57:34 -0000
> Resent-Date: 17 Apr 2000 05:57:34 -0000
> Resent-Cc: recipient list not shown: ;
> MBOX-Line: From blinux-list-request@redhat.com Mon Apr 17 01:57:33 2000
> From: Bing.Li@asu.edu
> Date: Sat, 15 Apr 2000 22:58:03 -0700 (MST)
> Subject: How to use PS1 so that the current path can be the prompt
> X-Sender: libing@general1.asu.edu
> To: blinux-list@redhat.com
> Cc: Bing Li <bing.li@asu.edu>
> Message-id: <Pine.GSO.3.96.1000415225600.3971A-100000@general1.asu.edu>
> MIME-version: 1.0
> Content-type: TEXT/PLAIN; charset=US-ASCII
> Resent-Message-ID: <"VuILx2.0.Tv6.DVg-u"@lists.redhat.com>
> Resent-From: blinux-list@redhat.com
> Reply-To: blinux-list@redhat.com
> X-Mailing-List: <blinux-list@redhat.com> archive/latest/869
> X-Loop: blinux-list@redhat.com
> Precedence: list
> Resent-Sender: blinux-list-request@redhat.com
>
> Dear all,
>
> How to use PS1 so that the current path can be the prompt? Please give me
> help! Thanks,
>
> Bing
>
> _________________
> | How are you? |_____ __
> | I am Li Bing. | |__| |_________
> |________________| OK? |::| | Need /
> | \.____|::|__| Help? <
> | \::/ \._______\
> /\**/\ | ___________________________________
> ( o_o )_ |__|http://www.public.asu.edu/~libing /
> (u--u \_) | |bing.li@asu.edu, 480-829-8492(H) /
> (||___ )==\ |480-965-3753(L)602-965-1746(O) \
> ,dP"/b/=( /P"/b\ |__________________________________\
> |8 || 8\=== || 8
> `b, ,P `b, ,P
> """` """`
>
>
> ---
> Send your message for blinux-list to blinux-list@redhat.com
> Blinux software archive at ftp://leb.net/pub/blinux
> Blinux web page at http://leb.net/blinux
> To unsubscribe send mail to blinux-list-request@redhat.com
> with subject line: unsubscribe
>
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: How to use PS1 so that the current path can be the prompt
` A. R. Vener
@ ` Bing.Li
0 siblings, 0 replies; 5+ messages in thread
From: Bing.Li @ UTC (permalink / raw)
To: blinux-list
Thank you very much!
Bing
_________________
| How are you? |_____ __
| I am Li Bing. | |__| |_________
|________________| OK? |::| | Need /
| \.____|::|__| Help? <
| \::/ \._______\
/\**/\ | ___________________________________
( o_o )_ |__|http://www.public.asu.edu/~libing /
(u--u \_) | |bing.li@asu.edu, 480-829-8492(H) /
(||___ )==\ |480-965-3753(L)602-965-1746(O) \
,dP"/b/=( /P"/b\ |__________________________________\
|8 || 8\=== || 8
`b, ,P `b, ,P
"""` """`
On Mon, 17 Apr 2000, A. R. Vener wrote:
>
> In ksh this is simple. In your .profile have the line:
>
> export PS1="\$PWD> "
>
>
> Rudy
>
>
> > From blinux-list-request@redhat.com Mon Apr 17 00:57:44 2000
> > Return-Path: <blinux-list-request@redhat.com>
> > Received: from lists.redhat.com (lists.redhat.com [199.183.24.247])
> > by cougar.aero-vision.com (8.9.3/8.9.3) with SMTP id AAA25623
> > for <salt@aero-vision.com>; Mon, 17 Apr 2000 00:57:44 -0500
> > Received: (qmail 28285 invoked by uid 501); 17 Apr 2000 05:57:34 -0000
> > Resent-Date: 17 Apr 2000 05:57:34 -0000
> > Resent-Cc: recipient list not shown: ;
> > MBOX-Line: From blinux-list-request@redhat.com Mon Apr 17 01:57:33 2000
> > From: Bing.Li@asu.edu
> > Date: Sat, 15 Apr 2000 22:58:03 -0700 (MST)
> > Subject: How to use PS1 so that the current path can be the prompt
> > X-Sender: libing@general1.asu.edu
> > To: blinux-list@redhat.com
> > Cc: Bing Li <bing.li@asu.edu>
> > Message-id: <Pine.GSO.3.96.1000415225600.3971A-100000@general1.asu.edu>
> > MIME-version: 1.0
> > Content-type: TEXT/PLAIN; charset=US-ASCII
> > Resent-Message-ID: <"VuILx2.0.Tv6.DVg-u"@lists.redhat.com>
> > Resent-From: blinux-list@redhat.com
> > Reply-To: blinux-list@redhat.com
> > X-Mailing-List: <blinux-list@redhat.com> archive/latest/869
> > X-Loop: blinux-list@redhat.com
> > Precedence: list
> > Resent-Sender: blinux-list-request@redhat.com
> >
> > Dear all,
> >
> > How to use PS1 so that the current path can be the prompt? Please give me
> > help! Thanks,
> >
> > Bing
> >
> > _________________
> > | How are you? |_____ __
> > | I am Li Bing. | |__| |_________
> > |________________| OK? |::| | Need /
> > | \.____|::|__| Help? <
> > | \::/ \._______\
> > /\**/\ | ___________________________________
> > ( o_o )_ |__|http://www.public.asu.edu/~libing /
> > (u--u \_) | |bing.li@asu.edu, 480-829-8492(H) /
> > (||___ )==\ |480-965-3753(L)602-965-1746(O) \
> > ,dP"/b/=( /P"/b\ |__________________________________\
> > |8 || 8\=== || 8
> > `b, ,P `b, ,P
> > """` """`
> >
> >
> > ---
> > Send your message for blinux-list to blinux-list@redhat.com
> > Blinux software archive at ftp://leb.net/pub/blinux
> > Blinux web page at http://leb.net/blinux
> > To unsubscribe send mail to blinux-list-request@redhat.com
> > with subject line: unsubscribe
> >
>
> ---
> Send your message for blinux-list to blinux-list@redhat.com
> Blinux software archive at ftp://leb.net/pub/blinux
> Blinux web page at http://leb.net/blinux
> To unsubscribe send mail to blinux-list-request@redhat.com
> with subject line: unsubscribe
>
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: How to use PS1 so that the current path can be the prompt
How to use PS1 so that the current path can be the prompt Bing.Li
` brianls
` A. R. Vener
@ ` Massimiliano Perantoni
2 siblings, 0 replies; 5+ messages in thread
From: Massimiliano Perantoni @ UTC (permalink / raw)
To: blinux-list
Hi!
you should go and mofify /etc/bashrc if you want to modify the system wide
prompt of bash, while if you want to modify only your account one then you
should modify ~/.bashrc. The variable should contain, where you like it
the \w switch, for example, my prompt is
Mon Apr 17 20:44:02
[maxper@max/usr/local/bin]
$
and is obtained with
export PS1="\d \t\n[\u@\h\w]\n\$"
Bye, Massimiliano
Il giorno dom, 16 apr 2000, Bing.Li@asu.edu ha scritto:
> Dear all,
>
> How to use PS1 so that the current path can be the prompt? Please give me
> help! Thanks,
>
> Bing
>
> _________________
> | How are you? |_____ __
> | I am Li Bing. | |__| |_________
> |________________| OK? |::| | Need /
> | \.____|::|__| Help? <
> | \::/ \._______\
> /\**/\ | ___________________________________
> ( o_o )_ |__|http://www.public.asu.edu/~libing /
> (u--u \_) | |bing.li@asu.edu, 480-829-8492(H) /
> (||___ )==\ |480-965-3753(L)602-965-1746(O) \
> ,dP"/b/=( /P"/b\ |__________________________________\
> |8 || 8\=== || 8
> `b, ,P `b, ,P
> """` """`
>
>
> ---
> Send your message for blinux-list to blinux-list@redhat.com
> Blinux software archive at ftp://leb.net/pub/blinux
> Blinux web page at http://leb.net/blinux
> To unsubscribe send mail to blinux-list-request@redhat.com
> with subject line: unsubscribe
--
"If automobiles had followed the same development cycle as the computer, a
Rolls-Royce would today cost $100, get a million miles per gallon, and explode
once a year, killing everyone inside." --Robert Cringley
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~ UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
How to use PS1 so that the current path can be the prompt Bing.Li
` brianls
` A. R. Vener
` Bing.Li
` Massimiliano Perantoni
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).