in reply to Processing Complicated Command Line Options using Getopt

There's a possibility you're taking the wrong approach.

Consider:

  1. Breaking up your cli into smaller pieces

    I.E. If your 'bin/cli' will clean the car if you pass it the --clean-car flag, consider moving that functionality to 'bin/clicleancar'

  2. Using a data file as input

    If this is a complex procedure, would it be useful to accept as input a YAML config file as option paramaters?

Ultimately you're the judge of this.

You may be in a situation a-la imagemagick, or mplayer .. these projects have already broken up their functionality into mplayer/mencoder/etc.. and convert/mogrify/etc. But the nature of the beast is such- that their cli is a monster.

  • Comment on Re: Processing Complicated Command Line Options using Getopt