purescript-yargs icon indicating copy to clipboard operation
purescript-yargs copied to clipboard

Commands?

Open damncabbage opened this issue 9 years ago • 2 comments

I've been trying to come up with a way to add .command() support to this library. I'm drawing a complete blank. Any ideas? :cold_sweat:

(The relevant Yargs docs: https://www.npmjs.com/package/yargs#commandcmd-desc-fn)

damncabbage avatar Feb 13 '16 13:02 damncabbage

Perhaps the best way is to use the version which takes a function, since that corresponds to a nested YargsSetup.

paf31 avatar Feb 16 '16 00:02 paf31

Yeah. I started there, but I struggled to plumb it all together into something that'll let you match some commands up to a sum-type of constructors with their own set of options, or... I'm struggling to think of the interface to all this, sorry.

(I had a brainstorm with @anttih a couple of months back, but came up blank.)

damncabbage avatar Feb 16 '16 01:02 damncabbage