Hi,
According to the manpage, the escape sequence \nnn is expanded to the
octal character nnn in the PS1 prompt.
In fact, it is expanded to a garbage.
It seems that dopprompt() (in src/bin/ksh/lex.c) has the wrong
calculation:
n = cp[0] * 8 * 8 + cp[1] * 8 + cp[2];
snprintf(strbuf, sizeof
2015-07-30 17:18 GMT+03:00 Vadim Ushakov igeekl...@gmail.com:
Hi,
According to the manpage, the escape sequence \nnn is expanded to the
octal character nnn in the PS1 prompt.
In fact, it is expanded to a garbage.
It seems that dopprompt() (in src/bin/ksh/lex.c) has the wrong
calculation:
2015-07-30 17:18 GMT+03:00 Vadim Ushakov igeekl...@gmail.com:
Hi,
According to the manpage, the escape sequence \nnn is expanded to the
octal character nnn in the PS1 prompt.
In fact, it is expanded to a garbage.
It seems that dopprompt() (in src/bin/ksh/lex.c) has the wrong
calculation:
On Thu, 30 Jul 2015 17:50:29 +0300, Vadim Zhukov wrote:
Too bad that I don't know how to make a test for this issue in
regress/usr.bin/ksh, though. It could tests stdin, stdout, stderr and
files, but I dunno how to test the shell prompt. Any ideas?
How about this?
- todd
Index: regress.t