Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

usage statement #7

defunctzombie opened this Issue Aug 27, 2011 · 2 comments


None yet
3 participants

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 commented Jan 8, 2012

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 commented Jan 17, 2013

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

@isaacs isaacs closed this Jan 17, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment