bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: TZ=... date affected PROMPT_COMMAND


From: Chet Ramey
Subject: Re: TZ=... date affected PROMPT_COMMAND
Date: Thu, 17 Apr 2008 10:23:20 -0400
User-agent: Thunderbird 2.0.0.12 (Macintosh/20080213)

address@hidden wrote:
OK, now using Archimerged's cleaner version, I bet Matthew can
reproduce this.

address@hidden:/root# su - nobody
No directory, logging in with HOME=/
address@hidden:/$ PROMPT_COMMAND='prompt_status=\ $?'
address@hidden:/$ PS1=$SPECIAL_PS1"\A\${prompt_status# 0} \W$ "
17:26 /$ TZ=America/Los_Angeles date
Thu Apr 17 02:26:11 PDT 2008
02:26 /$ echo $BASH_VERSION
3.1.17(1)-release
02:26 /$ false
02:26 1 /$ true
02:26 /$ /bin/true
17:26 /$

Upgrade:

$ uname -a
Linux jenna 2.6.22-14-generic #1 SMP Tue Feb 12 07:42:25 UTC 2008 i686 GNU/Linux
$ PROMPT_COMMAND='prompt_status=\ $?'
$ PS1=$SPECIAL_PS1"\A\${prompt_status# 0} \W$ "
09:59 bash-3.2-patched$ TZ=America/Los_Angeles date
Thu Apr 17 06:59:41 PDT 2008
09:59 bash-3.2-patched$ false
09:59 1 bash-3.2-patched$ true
09:59 bash-3.2-patched$ /bin/false
10:00 1 bash-3.2-patched$ /bin/true
10:00 bash-3.2-patched$

Bash-3.2 fixed a bug involving temporary environments that sounds related.

Chet

--
``The lyf so short, the craft so long to lerne.'' - Chaucer

Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]