From owner-freebsd-questions Wed Jan 2 15:35:42 2002 Delivered-To: freebsd-questions@freebsd.org Received: from lists.blarg.net (lists.blarg.net [206.124.128.17]) by hub.freebsd.org (Postfix) with ESMTP id 5052537B419 for ; Wed, 2 Jan 2002 15:35:40 -0800 (PST) Received: from thig.blarg.net (thig.blarg.net [206.124.128.18]) by lists.blarg.net (Postfix) with ESMTP id E2910BD16; Wed, 2 Jan 2002 15:35:39 -0800 (PST) Received: from localhost.localdomain ([206.124.139.115]) by thig.blarg.net (8.9.3/8.9.3) with ESMTP id PAA17720; Wed, 2 Jan 2002 15:35:39 -0800 Received: (from jojo@localhost) by localhost.localdomain (8.11.6/8.11.3) id g02Namu37723; Wed, 2 Jan 2002 15:36:48 -0800 (PST) (envelope-from swear@blarg.net) To: "J.S." Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell prompt contest References: <20020102150618.04ae22ff.johann@broadpark.no> From: swear@blarg.net (Gary W. Swearingen) Date: 02 Jan 2002 15:36:48 -0800 In-Reply-To: <20020102150618.04ae22ff.johann@broadpark.no> Message-ID: Lines: 21 User-Agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.1 (Cuyahoga Valley) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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 "J.S." writes: > Let's see who has the prettiest one :-) Everyone so far seems to think he's asking for the prettiest prompt code, and have not shown their prompts. Let's see both, please. $ cd /root/bin ## 15:25:25 ## username @ /root/bin ## Wed 2 Jan 2002 PST $ next-command.... In pdksh (two lines): PS1='$(set -A PS1 $(date); echo "## ${PS1[3]} ## $(id -un) @ $PWD ## ${PS1[0]} ${PS1[2]} ${PS1[1]} ${PS1[5]} ${PS1[4]} $ ")' One of the best things about using a commmand line interface is having a transcript of one's activity, which is greatly aided by having the time/date in the prompt. Interpretation of the transcript is also aided by having the user name and PWD listed. If I didn't do so much in XEmacs shells, I'd probably add some color too. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message