|
| From: | Per Bothner |
| Subject: | Re: [Bug-readline] miscalculation with wrapped prompt line |
| Date: | Thu, 10 Dec 2015 12:41:49 -0800 |
| User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 |
Here is another cute one:
PS1='\[\033[1m\]'ABCDEFGHIJKLMNOPGRSTUVWXYZ"[\#]"ABCDEFGHIJKLMNOPGRSTUVWXYZ:"\[\e[0m\]"
Start xterm; narrow the width to 50 columns; and type:
TERM=vt100
Now type a letter - say 'p'.
Readline echos the 'p' followed by "\e[C\e[C\e[C\e[C"
so the cursor is 4 spaces ahead of the 'p'.
--
--Per Bothner
address@hidden http://per.bothner.com/
| [Prev in Thread] | Current Thread | [Next in Thread] |