From owner-freebsd-questions Sun Jan 6 15:14: 1 2002 Delivered-To: freebsd-questions@freebsd.org Received: from kabel203069.kabel.utwente.nl (kabel203069.kabel.utwente.nl [130.89.203.69]) by hub.freebsd.org (Postfix) with ESMTP id 7414537B404 for ; Sun, 6 Jan 2002 15:13:55 -0800 (PST) Received: by kabel203069.kabel.utwente.nl (Postfix, from userid 1000) id 04EC61F91; Mon, 7 Jan 2002 00:13:54 +0100 (CET) Date: Mon, 7 Jan 2002 00:13:53 +0100 From: Rogier Steehouder To: "J . S ." Cc: freebsd-questions@freebsd.org Subject: Re: Shell prompt contest Message-ID: <20020107001353.B837@localhost> Mail-Followup-To: Rogier Steehouder , "J . S ." , freebsd-questions@freebsd.org References: <20020102150618.04ae22ff.johann@broadpark.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit User-Agent: Mutt/1.2.5i In-Reply-To: <20020102150618.04ae22ff.johann@broadpark.no>; from johann@broadpark.no on Wed, Jan 02, 2002 at 03:06:18PM +0100 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 02-01-2002 15:06 (+0100), J . S . wrote: > Let's see who has the prettiest one :-) > > -- LET THE GAMES BEGIN! I use bash. On ANSI terminals with the correct codepage (basically the console): PS1="\[\e[0;36m\]ÚÄ(\$?)Ä(\u@\h on $(tty|cut -d/ -f3))Ä(\$(date +'%H:%M %d-%m-%Y'))ÄÄ\[\e[1;30m\]Ä\[\e[0m\]\n\[\e[0;36m\]ÀÄ(\w)ÄÄ\[\e[1;30m\]Ä\[\e[0m\]" PS2="\[\e[0;36m\e[1A\]Ã\[\e[1D\e[1B\]ÀÄÄ\[\e[1;30m\]Ä\[\e[0m\]" Looking like (it uses box-drawing characters and colors): ÚÄ(i0)Ä(root@localhost on tty7)Ä(0:06 06-01-2002)ÄÄÄ ÀÄ(~)ÄÄÄ ÚÄ(i0)Ä(root@localhost on tty7)Ä(0:06 06-01-2002)ÄÄÄ ÃÄ(~)ÄÄÄ ÀÄÄÄ With PS2 it replaces the first character of the second line, so the lines continue. Combined with color makes it a good visual aid to find your command lines. For non-ansi/wrong codepage terminals I use: PS1="[\$?]-[\u@\h: \w]> " PS2="> " Just standard, but I do include the previous program's exit code. With kind regards, Rogier Steehouder -- ___ _ -O_\ // | / Rogier Steehouder //\ / \ r.j.s@gmx.net // \ <---------------------- 25m ----------------------> To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message