nesh icon indicating copy to clipboard operation
nesh copied to clipboard

Access to `optimist` used to generate help documentation correctly

Open ccheever opened this issue 11 years ago • 1 comments

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.

ccheever avatar Jan 10 '14 06:01 ccheever

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.

danielgtaylor avatar Mar 26 '14 14:03 danielgtaylor