GithubHelp home page GithubHelp logo

Question re: Slop Help about slop HOT 3 CLOSED

andyl avatar andyl commented on May 26, 2024
Question re: Slop Help

from slop.

Comments (3)

leejarvis avatar leejarvis commented on May 26, 2024

At the moment there's not. I've thought about adding the ability to display optional arguments in square brackets and non-option arguments in curly brackets. So a possible help text might look like this:

-n, --name <name>    Your name
-a, --age [age]            Your age
-v, --verbose              Enable verbose mode

For example. But I haven't yet committed to a style.

EDIT: Of course with the correct whitespace, it doesn't like me today

from slop.

andyl avatar andyl commented on May 26, 2024

Thanks for confirming the current behavior. Your example style would be a nice enhancement. - Andy

from slop.

leejarvis avatar leejarvis commented on May 26, 2024

I didn't like my earlier idea so I decided to try and hit with something else. This may be re-factored away in 2.0 and be made a little easier, but until then I dont want to break backwards compatibility and I'm not sure this is used all that often. Anyway, now you can do:

on :n, :name, 'Your name', true, :help => '<NAME>'

And help will show

    -n, --name <NAME>        Your name

Also, setting :help to false will omit an option from the help display.

from slop.

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.