dthree / vorpal

Node's framework for interactive CLIs
http://vorpal.js.org
MIT License
5.64k stars 280 forks source link

optional arguments appearing in help menu #84

Closed matt-oc closed 8 years ago

matt-oc commented 8 years ago

Is there a way to have the help menu print without the ["your arg..."] appearing after the command? Fantastic cli tool but this little feature doesn't fit with our application. Any ideas would be great.

dthree commented 8 years ago

Hey, thanks!

I happened to have it planned this week to introduce a vorpal.help method that will override the automated help. Would this work?

matt-oc commented 8 years ago

Yes that would probably work nicely, its non critical so I can push it out as an update. thanks

dthree commented 8 years ago

Sure, no problem. Will keep you informed.

dthree commented 8 years ago

Okay there's a new command, vorpal.help(fn), which lets you do a totally custom help menu. Available in v1.7.6.

To access the list of commands registered to vorpal, it's this.commands. You can play around with it from there.

dthree commented 8 years ago

Wiki: https://github.com/dthree/vorpal/wiki/API-|-vorpal#vorpalhelpfunction

Feel free to add clarity to them if you want.