Giter Site home page Giter Site logo

Comments (19)

jefferai avatar jefferai commented on May 14, 2024 5

I also ran into this using etcdctl. Check this out:

--peers, C [] -peers, C option -peers, C option a comma-delimited list of machine addresses in the cluster (default: {"127.0.0.1:4001"})

But actually doing something like -peers 127.0.0.1,127.0.0.2 doesn't work. What does work is specifying it multiple times like peers 127.0.0.1 -peers 127.0.0.2.

from cli.

thesyncim avatar thesyncim commented on May 14, 2024 1

If you use an example like this one

cli.StringSliceFlag{
    "dns", 
    &cli.StringSlice{"8.8.8.8", "8.8.4.4"}, //here we are setting some predefined  values
    "set one or more dns Servers"
},

help output

OPTIONS:
   --dns [8.8.8.8  4.4.4.4] `-dns option -dns option` set one or more dns Servers

does it make sense now?

from cli.

tjarratt avatar tjarratt commented on May 14, 2024

It seems like the confusing part of the help output is the word "option" in -lang option -lang option

from cli.

cab avatar cab commented on May 14, 2024

@thesyncim I appreciate the explanation! However, I'm more confused by what @tjarratt is referring to.

from cli.

tjarratt avatar tjarratt commented on May 14, 2024

@cab sorry, I was trying to explain which part of the help message I found confusing. The part that I find most confusing is the word "option". It would be easier to understand if there was some indication that option is really just a placeholder for user input.

from cli.

cab avatar cab commented on May 14, 2024

@tjarratt I worded my last response poorly, I meant to say that I'm confused by the same thing :).

from cli.

jszwedko avatar jszwedko commented on May 14, 2024

I agree that it is a little confusing. Would something like -lang <option> -lang <option> be more clear?

from cli.

vieux avatar vieux commented on May 14, 2024

I would expect the output to show cleanly the default values, like any other flag:

OPTIONS:
   --lang english, --lang spanish    language for the greeting

from cli.

jszwedko avatar jszwedko commented on May 14, 2024

@vieux agreed, but how would you also display the short name there (in non-slice types it has --lang, l 'english', but something like --lang, -l english, --lang, -l spanish language for the greeting looks weird). I guess this would be solved by specifying the defaults after the usage (or allowing the user to template in the defaults like in Python's optparse), but I'm not sure if that would be breaking the API of this library.

from cli.

meatballhat avatar meatballhat commented on May 14, 2024

The help output for slice types has been changed (significantly?) since this issue was last updated, and I don't think it's relevant anymore. Please yell if you disagree!

from cli.

porjo avatar porjo commented on May 14, 2024

Current help output for slice flags is not intuitive. It does not provide any hint that the flag should be specified multiple times. For example, the following is a slice flag

   --domains value, -d value   Add domains to the process

...how will the user know that they should include this multiple times if they want to pass in multiple domains!? A naive user might attempt to put all the domains together e.g. --domains example1.com example2.com

This form makes more sense to me:

  --domains, -d [--domains option --domains option]            Add domains to the process

from cli.

jszwedko avatar jszwedko commented on May 14, 2024

Agreed, reopening

from cli.

RafPe avatar RafPe commented on May 14, 2024

I will jump to the discussion and say that I would agree with @jefferai something like

--items=1.2.3.4/32,2.3.4.5/32

or ...

--items="1.2.3.4/32 2.3.4.5/32"

Would make more sense in my use case scenarios.

from cli.

stale avatar stale commented on May 14, 2024

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

from cli.

coilysiren avatar coilysiren commented on May 14, 2024

\\ bump ^^ I think there's definitely something we could do here

from cli.

stale avatar stale commented on May 14, 2024

This issue or PR has been bumped and is no longer marked as stale! Feel free to bump it again in the future, if it's still relevant.

from cli.

stale avatar stale commented on May 14, 2024

This issue or PR has been automatically marked as stale because it has not had recent activity. Please add a comment bumping this if you're still interested in it's resolution! Thanks for your help, please let us know if you need anything else.

from cli.

stale avatar stale commented on May 14, 2024

Closing this as it has become stale.

from cli.

dearchap avatar dearchap commented on May 14, 2024

Fixed and merged. b80ff3d

from cli.

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.