[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: nice PS1 with /bin/sh
Thank you for your mail, Trevor.
However, it did not work on /bin/sh (ksh).
yutaka@dx:~$ export PS1="\u@\H:\w$ "
\u@\H:\w$ bash
yutaka@dx:~$ exit
exit
\u@\H:\w$ echo $SHELL
/bin/sh
\u@\H:\w$ echo $KSH_VERSION
@(#)PD KSH v5.2.13.7 99/01/15
\u@\H:\w$
Thanks again, anyhow.
-- Original Message --
From: Trevor Schroeder <tschroed@zweknu.org>
Subject: Re: nice PS1 with /bin/sh
Date: Sun, 2 Apr 2000 12:30:47 -0400
Message-ID: <20000402123047.A17033@duckdog.zweknu.org>
> On Mon, Apr 03, 2000 at 12:44:24AM +0900, Yutaka KAWASE wrote:
>
> > PS1="$USER@`hostname`:`echo $PWD | perl -pe 's#^$ENV{HOME}#~#'`$ "
> >
> > and this gives me the prompt of my favorite.
> >
> > However, I don't want to use perl to set up PS1.
> > I think I should use sed instead but don't know how to do that.
>
> PS1="\u@\H:\w$ "
>
> This will also change as you move around in the directory tree.
> >..........................................................................
> : "I knew it was going to cost me my head and also my swivel chair, but :
> : I thought: What the hell--better men than I have risked their heads :
> : and their swivel chairs for truth and justice." -- James P. Cannon :
> :........... http://www.zweknu.org/ for PGP key and more ................:
--
Yutaka KAWASE <yutaka@chatnoir.net>