[EMAIL PROTECTED] wrote:
Never thought that putting TZ here would infect my prompt,
21:07 ~$ date
Wed Apr 16 21:07:54 CST 2008
21:07 ~$ TZ=America/Chicago date
Wed Apr 16 08:08:07 CDT 2008
08:08 ~$ set a b c
08:08 ~$ date
Wed Apr 16 21:08:22 CST 2008
21:08 ~$
all the way until the next non built-in command.
Need to do sh -c 'TZ=America/Chicago date'
if one doesn't want their prompt affected.
You didn't mention what version of bash you are using. I was unable to
reproduce this on 3.00.15 or 3.2.5.
(On the other hand, what I do in .bashrc is black magic to me too:)
PROMPT_COMMAND='prompt_tricks_z=" $?"; prompt_tricks_z=${prompt_tricks_z# 0}
Well, you could always read the bash manual to decipher the above :-).
I'll leave that as an exercise for you; the function of the above is
actually very straight-forward.
case $PWD in $HOME) pwd=\~;; *) pwd=${PWD##*/};; esac' #cfaj.freeshell.org
This part is unneeded. If I understand it correctly, you could remove
this line and replace '\$pwd' in your PS1 with \W to achieve the same
effect.
--
Matthew
> pinotree uses the large trout on tsdgeos and PutHuhn :)
> PutHuhn runs
> tsdgeos lights a fire and eats the trout
(with apologies to Pino Toscano, PutHuhn and Albert Astals Cid, who came
up with this entirely on their own)