[Linux-disciples] Including the results of a program in a prompt

Stephen R Laniel steve at laniels.org
Mon Nov 22 10:38:12 EST 2004


On Mon, Nov 22, 2004 at 10:29:34AM -0500, Adam Rosi-Kessel wrote:
> You need to escape the backticks, if you want them to be evaluated every 
> time the prompt is displayed, i.e.:

Ah. Makes total sense, and I figured something like that was
going on.

> personally, I would just do:
> 
> PS1="(\T) \u@\h:\w\$ "

Well, I was only using the :%S (number of seconds) to get an
immediate test of whether the time was refreshing. What I
actually wanted to use was %H:%M (hours:minutes), and I
suspect $(date +%H:%M) is the best way to do that.

Exactly my problem, and exactly your response, are here:

http://shorl.com/fupigrimedotra

It's surprising how often I forget to Google when I have a
problem.

-- 
``[My 3-year-old, Zoe] thought for a moment, and then said,
  `you think George Bush is too stupid to have so much
  wesponsibility?' Yes, child. Exactly that. Plus malice.''
 -http://crookedtimber.org/archives/002857.html

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.bostoncoop.net/pipermail/linux-disciples/attachments/20041122/cfbd0c57/attachment.pgp


More information about the Linux-disciples mailing list