From owner-freebsd-questions Sun Jan 6 21:21:58 2002 Delivered-To: freebsd-questions@freebsd.org Received: from post.mail.nl.demon.net (post-11.mail.nl.demon.net [194.159.73.21]) by hub.freebsd.org (Postfix) with ESMTP id DD5EE37B417 for ; Sun, 6 Jan 2002 21:21:53 -0800 (PST) Received: from [212.238.194.207] (helo=tanya.raggedclown.net) by post.mail.nl.demon.net with esmtp (Exim 3.33 #1) id 16NSEK-000FMV-00 for freebsd-questions@freebsd.org; Mon, 07 Jan 2002 05:21:52 +0000 Received: by tanya.raggedclown.net (Postfix on SuSE Linux 7.3 (i386), from userid 500) id 1B25E117C; Mon, 7 Jan 2002 06:21:52 +0100 (CET) Date: Mon, 7 Jan 2002 06:21:52 +0100 From: Cliff Sarginson To: freebsd-questions@freebsd.org Subject: Re: Shell prompt contest Message-ID: <20020107052152.GD1368@raggedclown.net> References: <20020102150618.04ae22ff.johann@broadpark.no> <20020107001353.B837@localhost> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020107001353.B837@localhost> User-Agent: Mutt/1.3.24i Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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