[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
rlwrap prompt disappears w/ readline 8.1
From: |
Felix C. Stegerman |
Subject: |
rlwrap prompt disappears w/ readline 8.1 |
Date: |
Thu, 10 Dec 2020 02:59:46 +0100 |
Hi!
With libreadline8=8.0:
$ rlwrap -C test python3 -c 'while True: print("you said", input(">>> "))'
>>> foo
you said foo
>>> bar
you said bar
>>> ^D
With libreadline8=8.1:
$ rlwrap -C test python3 -c 'while True: print("you said", input(">>> "))'
foo
you said foo
bar
you said bar
>>>
The ">>> " prompt is initially shown each time, but then disappears
from the output afterwards. If I input "baz" next, I get:
foo
you said foo
bar
you said bar
baz
you said baz
>>>
My analysis:
* readline 8.1 enables bracketed-paste by default;
* when bracketed-paste is enabled, rl_deprep_terminal() prints
BRACK_PASTE_FINI ("\033[?2004l\r") to rl_outstream;
* this moves the cursor to the beginning of the line (instead of the
position after the prompt), which causes the rlwrap prompt to be
overwritten during rl_redisplay().
* thus, adding "set enable-bracketed-paste off" to my ~/.inputrc fixes
the problem;
* THB I'm not entirely sure whether this is a bug in readline or in
rlwrap, so I'm reporting it to both.
- Felix
- rlwrap prompt disappears w/ readline 8.1,
Felix C. Stegerman <=