mirror of https://github.com/apache/cassandra
We can disable saving of the history either via command-line parameter --disable-history, or by setting disabled = True in the history section of the cqlshrc. Both options will read existing history, and just won't save new commands. Update help and docs for cqlsh history. Add startup info logline whenr history logging is enabled. Add a fix for cqlshrc file path not correctly expanding. Includes the Backport of Allows users to change cqlsh history location using env variable patch by Stefan Miklosovic; reviewed by Brandon Williams for CASSANDRA-17448 patch by Ekaterina Dimitrova; reviewed by Mick Semb Wever for CASSANDRA-XXX Co-authored-by: Alex Ott alex.ott@datastax.com Co-authored-by: Jaroslaw Grabowski jaroslaw.grabowski@datastax.com |
||
|---|---|---|
| .. | ||
| cqlshlib | ||
| README.asc | ||
| cassandra-cqlsh-tests.sh | ||
| pytest.ini | ||
| requirements.txt | ||
| setup.py | ||
README.asc
== Overview This directory contains code primarily for cqlsh. cqlsh uses cqlshlib in this directory. Currently, cqlshlib supports Python 2 as well as Python 3. Support for Python 3 is relatively new. == Requirements . Python 3 and 2.7 (for cqlsh) . virtualenv . Docker (optional) == Running tests In order to run tests for cqlshlib, run cassandra-cqlsh-tests.sh in this directory. It will automatically setup a virtualenv with the appropriate version of Python and run tests inside it. To run cqlsh using publicly available Docker images to connect to Cassandra on the same host, with `$CASSANDRA_DIR` pointing to either the source or install directory where `bin/cqlsh` is located. For Python 3.11: $ docker run -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh host.docker.internal For Python 2.7: $ docker run -v $CASSANDRA_DIR:/code -it python:2.7-slim /code/bin/cqlsh host.docker.internal If `host.docker.internal` isn't supported, then you can use `--net="host"`: $ docker run --net="host" -v $CASSANDRA_DIR:/code -it python:3.11-slim /code/bin/cqlsh This will try to spawn a cqlsh instance inside the Docker container with a minimal Python installation. It will try to connect to the Cassandra instance running on the Docker host at port 9042. If you have Cassandra running elsewhere, replace host.docker.internal with the IP / hostname as usual. Please ensure that the IP / host is accessible from _within_ the Docker container.