Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Ivan Shmakov Newsgroups: alt.comp.lang.shell.unix.bourne-bash,comp.os.linux.misc Subject: PS1 Date: Sat, 09 Feb 2013 19:11:18 +0000 Organization: Aioe.org NNTP Server Lines: 29 Message-ID: <87txpl7161.fsf_-_@violet.siamics.net> References: <1f80d1f3-3202-441e-ab99-4840bc344c87@googlegroups.com> NNTP-Posting-Host: 41vvMPMLxfEjizuK6lSUHw.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) X-Notice: Filtered by postfilter v. 0.8.2 Cancel-Lock: sha1:8GFR1h4lrXRYJHiM0fDLZry1Pg8= Xref: csiph.com comp.os.linux.misc:7281 >>>>> Eric Pozharski writes: >>>>> with Aragorn wrote: [Cross-posting to news:alt.comp.lang.shell.unix.bourne-bash.] >> [04:46:03][localhost:/home/aragorn] [0][aragorn][$] > > What an evil PS1 you have! What mean those '[0]' and '[$]' in second > line? The last command's exit code and \$, I guess? > p. s. I have PS1 like this too. But it's for logins with no > $DISPLAY. FWIW, I'm using a simpler prompt: PS1='${debian_chroot:+($debian_chroot) }[\u@\h] \W\$ ' Or, should I need timestamps: PS1='${debian_chroot:+($debian_chroot) }[\u@\h] $(printf x%08x "$(date +%s)") \W\$ ' \W is quite apt for me, given that I may occasionally have to visit something like /home/public/users/ivan/download/svn-sync/, or /home/private/users/ivan/private/slides/debian-apt-2012/. -- FSF associate member #7257