dn-m / Helper

Command line interface for managing dn-m frameworks
0 stars 0 forks source link

Implement options #10

Open jsbean opened 7 years ago

jsbean commented 7 years ago

Options:

See the Carthage command line tool implementation of Commandant.

jsbean commented 7 years ago

@brianlheim thoughts?

jsbean commented 7 years ago

One thing that's weird is --demo is only applicable for --type -f and not --type -a. It's not properly orthogonal. It would require more nesting, which I'm not sure is totally possible yet.

Perhaps we start like this, and throw an error if you try to do --type -a --demo, and refactor later if the knowledge has been gained?

jsbean commented 7 years ago

Also, am I doing the syntax right?

mossheim commented 7 years ago

Common practice is for single-character options to be preceded by - and any options with longer names by --. That way you can concatenate multiple options as in the command ls -alin == ls -a -l -i -n. So the most idiomatic command set would use --frameworks & --config for update and add -p, -t for init.

By --type -a --demo I think you mean --type a --demo. Generally only options start with -. The syntax definitely takes some getting used to! And yeah, for now throw an error if someone explicitly calls -t a --demo.

Also, are there default values for init? If not, I think it'd make more sense to have the command just be init [-d] platform type

jsbean commented 7 years ago

Ahh, yes re: --type a --demo.

jsbean commented 7 years ago

Looking closer to this:

Options: