danielgtaylor / nesh

An enhanced, extensible interactive shell for Node.js and CoffeeScript
http://danielgtaylor.github.io/nesh/
MIT License
288 stars 27 forks source link

Access to `optimist` used to generate help documentation correctly #9

Open ccheever opened 10 years ago

ccheever commented 10 years ago

I've written a plugin for nesh and it takes a command line option (-f or --fibrous). I'd like to use optimist.describe() to document what the option does so that users who run: nesh --help will see it listed there, but since when I require('optimist') within my plugin, I don't get the same optimist object, so when I call .describe() on it, it doesn't have any effect.

If you could expose that as nesh.optimist or something, that would make it easy to add help documentation.

If you're open to it, I can write a patch and submit a pull request when I have time.

danielgtaylor commented 10 years ago

I'm definitely open to this idea. It also seems like optimist was abandoned in favor of yargs, which we may want to switch to.