Uploaded image for project: 'Couchbase Server'
  1. Couchbase Server
  2. MB-12976

couchbase-cli context based help

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 4.0.0
    • 3.0.1
    • None
    • Security Level: Public

    Description

      I've been trying to discipline myself to perform as much admin of my clusters from the CLI, but learning is hard when you forget that one crucial parameter and the CLI help system dumps so much information at once.

      I'd really like the following to only show me bucket-create help rather than dumping pages of information to my terminal.

      > couchbase-cli bucket-create -h
      > couchbase-cli bucket-create -c 192.168.0.1:8091 --bucket=test_bucket --bucket-type=couchbase -h

      (same for -H and --help)

      All other invocations shall dump the masses of help and examples as per current code.

      > couchbase-cli -h
      > couchbase-cli -H
      > couchbase-cli --help
      > couchbase-cli help

      And finally dump a shorter usage (as per current code).

      > couchbase-cli

      I have a patch in my local world which actually does this because i've been creating and destroying my dev clusters like there's no tomorrow

      The technique is to make the command classes own the help, so when I know the current command is 'bucket-create' I ask the bucket.Bucket class for bucket-create help

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              drigby Dave Rigby (Inactive)
              jwalker Jim Walker
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes

                  PagerDuty