cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Patrick Bannister (JIRA)" <>
Subject [jira] [Created] (CASSANDRA-14494) Investigate possibility of a cqlsh terminfo
Date Sun, 03 Jun 2018 15:01:00 GMT
Patrick Bannister created CASSANDRA-14494:

             Summary: Investigate possibility of a cqlsh terminfo
                 Key: CASSANDRA-14494
             Project: Cassandra
          Issue Type: Sub-task
         Environment: This behavior has been observed in xterm on CentOS 7.5 platforms. The unit tests (pylib/cqlshlib/test/ are a good place
to see it in action.
            Reporter: Patrick Bannister
             Fix For: 4.x

Summary: investigate whether we could use a cqlsh-specific terminfo file to prevent use of
the set-meta-mode escape sequence in xterm without breaking colors. If it works, see if we
can install it in an appropriate place using Python distutils. If yes to both, generate a
cqlsh terminfo file and work it into the install process.

Long detailed explanation:

In some more recent environments, in Python REPL applications that use the readline module,
the set meta mode escape sequence is output before each prompt. This escape sequence has caused
problems for some applications, and in our case, some of our cqlsh unit tests (pylib/cqlshlib/test/
choke on this output because of the way our tests are designed to detect the cqlsh prompt.
This behavior was observed on a CentOS 7.5 platform.

The set-meta-mode escape sequence normally appears as "[?1034h" in output; it's normally defined
as the bytes 1b 5b 3f 31 30 33 34 68.  The exact value of the escape sequence is configurable
and may be found on a GNU/Linux platform by running the command:
tput smm | hexdump{code}
If this command gives no output, then the set meta mode sequence is not defined on this platform
for the terminal in use. Refer to the xterm and terminfo man pages for more information on
this sequence.

There are easier ways to solve this problem for the sake of the unit test, but if time allows,
I'd like to look into this to achieve a more consistent output behavior for cqlsh on GNU/Linux

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message