🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by James Van Artsdalen Wed, 14 Jun 1989 04:36
Re: Prompt interpretation for bash
#95
Author: James Van Artsdalen
Date: Wed, 14 Jun 1989 04:36
28 lines
1455 bytes
> From: composer@bu-cs.BU.EDU
> Date:  Tue, 13 Jun 89 18:21:50 EDT

|   Date: 13 Jun 89 18:13:53 GMT
|   From: milano!bigtex!james@cs.utexas.edu  (James Van Artsdalen)

|   PS1='`$PROMPT_COMMAND`rest_of_prompt'

The single quotes are no accident...

> I'm not that familiar with ksh specifics, so I'm not sure what you're
> referring to.  But, I'm able to get the same thing to work as what I
> believe you want the above to do.

> 	PS1="`$PROMPT_COMMAND`rest_of_prompt"

This doesn't do the same thing.

> The double quotes will allow the $variable to be expanded.  Is this
> what you were referring to?

No.  This question is *when* does the string get evaluated.  In your
example it got evaluated immediately and never again.  In my example,
it did not get evaluated immediately, and with my patch, it will be
re-evaluated each time the the prompt is printed.
---
James R. Van Artsdalen          james@bigtex.cactus.org   "Live Free or Die"
Dell Computer Co    9505 Arboretum Blvd Austin TX 78759         512-338-8789
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads