Hi, after build rc1 of bash 5.1 as well as readline-8.1 I've set up test staging process. During build the package python-pexpect throws errors in its test suite, e.g.
[ 260s] self = <tests.test_async.AsyncTests
testMethod=test_async_replwrap_multiline>
[ 260s]
[ 260s] def test_async_replwrap_multiline(self):
[ 260s] bash = replwrap.bash()
[ 260s] coro = bash.run_command("echo '1 2\n3 4'", async_=True)
[ 260s] res = run(coro)
[ 260s] > self.assertEqual(res.strip().splitlines(), ['1 2', '3 4'])
[ 260s] E AssertionError: Lists differ: ['\x1b[?2004l',
'\x1b[?2004h\x1b[?2004l', '1 2', '3 4', '\x1b[?2004h'] != ['1 2', '3 4']
[ 260s] E
[ 260s] E First differing element 0:
[ 260s] E '\x1b[?2004l'
[ 260s] E '1 2'
[ 260s] E
[ 260s] E First list contains 3 additional elements.
[ 260s] E First extra element 2:
[ 260s] E '1 2'
[ 260s] E
[ 260s] E - ['\x1b[?2004l', '\x1b[?2004h\x1b[?2004l', '1 2', '3 4',
'\x1b[?2004h']
[ 260s] E + ['1 2', '3 4']
I found this is caused by (_rl_)enable[-_]bracketed[-_]paste as the sequences
are defined in rlprivate.h
#define BRACK_PASTE_INIT "\033[?2004h"
#define BRACK_PASTE_FINI "\033[?2004l\r"
indeed it is a nice feature to see highlighted paste content on the interactive
command line, but why this interferes with tools like pexpect using bash in
interactive mode?
Werner
--
"Having a smoking section in a restaurant is like having
a peeing section in a swimming pool." -- Edward Burr
signature.asc
Description: PGP signature
