[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Patch for /usr/src/bin/ksh
- To: tech_(_at_)_openbsd_(_dot_)_org
- Subject: Patch for /usr/src/bin/ksh
- From: Marcus Glocker <marcus_(_at_)_nazgul_(_dot_)_ch>
- Date: Wed, 12 Apr 2006 19:47:23 +0200
Hello,
I recently switched from bash to ksh on some machines and noticed that
my custom prompt PS1 didn't work with the '\$' escape sequence. I
checked the man page and found:
\$ The default prompt i.e. `# ' if the effective
UID is 0, otherwise `$ '. Note: this sequence
is not yet implemented.
The following patch for lex.c and ksh.1 should implement '\$' now and
remove the note from the man page.
Mainly the problem was that POSIX seems to want '\$' escaped in any
case, so the later prompt function just got an already escaped '$'
and therefore ignored it.
If the patch is fine for you (please test), I would go ahead and also
implement this guy:
\! The current history number (see `\#', below).
Note: this sequence is not yet implemented.
Regards,
Marcus
--
Marcus Glocker, marcus_(_at_)_nazgul_(_dot_)_ch, http://www.nazgul.ch -----------------
[demime 1.01d removed an attachment of type application/octet-stream which had a name of lex_c.patch]
[demime 1.01d removed an attachment of type application/octet-stream which had a name of ksh_1.patch]
Visit your host, monkey.org