ndmitchell / cmdargs

Haskell library for command line argument processing
Other
91 stars 12 forks source link

Running multiple sub-commands #59

Open srid opened 5 years ago

srid commented 5 years ago

I'm wondering if it is possible at all to be able to run like ./myprog cmd1 cmd2 ... using this library? The modes things returns a single command, so maybe not ?

ndmitchell commented 5 years ago

Each invocation returns only one mode. If you just want to collect individual names, you could treat them as arguments to a single mode. If you want multiple successive modes and arguments then you'll probably have to figure out how to split the arguments and then call cmdargs multiple times.