Date: 02 Jan 2002 15:36:48 -0800 From: swear@blarg.net (Gary W. Swearingen) To: "J.S." <johann@broadpark.no> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Shell prompt contest Message-ID: <l8ell8ba0f.ll8@localhost.localdomain> In-Reply-To: <20020102150618.04ae22ff.johann@broadpark.no> References: <20020102150618.04ae22ff.johann@broadpark.no>
next in thread | previous in thread | raw e-mail | index | archive | help
"J.S." <johann@broadpark.no> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?l8ell8ba0f.ll8>