Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

usage statement #7

Closed
defunctzombie opened this Issue · 2 comments

3 participants

@defunctzombie

Would be nice to have something that prints the usage statement nicely for you. Maybe even allow descriptions to be passed to the option definitions for this. Without a usage statement, most program options cannot be discovered and providing a common way to print a usage statement is nice since completion tools can be built around it.

@cmr
cmr commented

Where do you propose the usage summaries for each option be put? I don't see a clean way of sliding them in there, unless knownOpts can turn into:

knownOpts = { "foo" : [String, null]
                , "bar" : [[Stream, Number], "make the bar as hard as possible"],
                , "baz" : [path, "where to drop the flag"],
                , "bloo" : [[ "big", "medium", "small" ], "a size"],
                , "flag" : Boolean
                , "pick" : Boolean
                } 

But that's dirty and finicky to handle, for cases like "barify": ["how to barify the baz"] or "barify": "how to barify the baz".

I think it's better just to write the usage statements by hand.

@isaacs
Owner

Doing this as a separate standalone module would probably be better.

@isaacs isaacs closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.