Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Jan 2002 06:21:52 +0100
From:      Cliff Sarginson <cliff@raggedclown.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Shell prompt contest
Message-ID:  <20020107052152.GD1368@raggedclown.net>
In-Reply-To: <20020107001353.B837@localhost>
References:  <20020102150618.04ae22ff.johann@broadpark.no> <20020107001353.B837@localhost>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jan 07, 2002 at 12:13:53AM +0100, Rogier Steehouder wrote:
> On 02-01-2002 15:06 (+0100), J . S . wrote:
> > Let's see who has the prettiest one :-)
> > 
> > -- LET THE GAMES BEGIN!
> 
In my day job I work with a variety of Unix systems, and consequently
I do not always have access to "bash", which is my preferred shell
and sometimes I have to work in accounts not under my control, and
as other users, so am at the mercy of whoever set that up.

So rather than a pretty PS1, I try to see which shell is being foisted
on me and set the PS1 as best I can (you have to do the same thing
if you use echo and newline suppression btw)..
so PS1 has to handle:

sh (a la Bourne, or perhaps a la BSD Bourne)
bash
korn (there is no such thing as a standard korn shell, wlthough Mr Korn
 may disagree (since he wrote it), the korn shell has variations in
 behaviour on different systems I have used)
(t)csh

Now on FBSD csh--->tcsh, but this is not true universally.

Anyway it is quite a challenge...(systems include but are not limited to
Solaris, HP-UX, AIX, Linux), most of the team I work in use tcsh,
except me.

OT a bit, but the other challenge is finding a way of exporting
functions and aliases that works (again the "ksh" shows a huge variety
of behaviour in this regard).

I have this is my .bashrc on the machine I work on at home...

PROMPT_COMMAND='echo -ne \
"\0337\033[2;999r\033[1;1H\033[00;44m\033[K"`date`"\033[00m\0338"'


-- 
Regards
Cliff



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020107052152.GD1368>