On 6/10/26 3:09 PM, Robert Elz wrote:
That was just David Korn copying what csh had done (csh had no variable expansions in prompts, or certainly not in 1980 or before) because users wanted expansions in prompts, he wanted to convert csh users to the much better Bourne shell style, and he didn't think of doing it a more appropriate way (then anyway). bash copied that, and now is stuck with the mistake forever.
For once, you can't blame David Korn for this. The backslash escapes in PS1 and PS2 are a bash invention, though the functionality was modeled on the csh $prompt escape sequences.
| though I agree that they should actually be documented in the manual. I'm not sure what you're agreeing with, as that isn't what I said. I said they're not documented, the implication being that you cannot rely upon them not changing. They should remain undocumented (as long as the current approach remains, and the user doesn't get to pick what to use).
They're documented as part of the readline API. Bash doesn't document the
readline programming interface, only what the user can see and use.
Chet
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU [email protected] http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature
