Git Product home page Git Product logo

Comments (5)

thepaul avatar thepaul commented on August 11, 2024

Ha, I see that there's already a cli command implemented for nodes, it's just not enabled in the node command list. I guess because it's aimed at older versions of cassandra-cli, and might not be ideal for the modern, readline-y tool we have today.

What if we just ran cassandra-cli connected to the user's tty and let them use it interactively, rather than parsing input commands and funneling its i/o on pipes?

from ccm.

thepaul avatar thepaul commented on August 11, 2024

Oops, closed by mistake

from ccm.

pcmanus avatar pcmanus commented on August 11, 2024

The lack of listing of the 'cli' command is a mistake, I've just corrected that. There was no "ccm cli" (only "ccm $node cli") because I've never really bothered but I've just added a simple to connect to some live node since that's trivial.

Now the 'cli' command is meant for the current cli (I'm using it quite a lot). Without the --exec parameter, ccm cli will let you use the cli interactively. The "parsing input commands and funneling its i/o on pipes" happens with the --exec parameter, whose goal is to be used in scripts. More precisely, the parsing of the input is just so that you can write:

ccm cli --exec "create keyspace foo; create column family bar"

instead of having to write

ccm cli --exec "create keyspace foo;\n create column family bar;"

And the funneling with the i/o pipes is so that the standard output is not shown while still reporting when there is an error.

I'm not pretending that code is very clean (and no doubt it can be improved) but at least it is very handy and works relatively well based on my experience.

from ccm.

thepaul avatar thepaul commented on August 11, 2024

So I was thinking with the above patch, that the user could use cassandra-cli's --batch option to similar effect:

ccm cli --batch <<<"create keyspace foo;"

not quite good enough? i can revise my patch to maintain the --exec switch

from ccm.

thepaul avatar thepaul commented on August 11, 2024

Nevermind, I see you adapted these changes and committed already.

from ccm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.