commander 1.0.3

Command-line interfaces in D made easy. Easy command-line parsing based in commander.js.


To use this package, run the following command in your project's root directory:

Manual usage
Put the following dependency into your project's dependences section:

commander.d

Command-line interfaces in D made easy. Easy command-line parsing based in commander.js.

Usage

Checking for flags being parsed:

auto program = new Commander()
  .option!("-v,--verbose", "Be verbose")
  .parse(["rdmd", "app.d", "-v"]);
assert(program.flag("verbose") == true);
assert(program.param("output") is null);

Checking for parameters being parsed

auto program = new Commander()
  .option!("-o,--output <output-dir>", "An output directory")
  .parse(["rdmd", "app.d", "-o", "fun-directory"]);
assert(program.flag("verbose") == false);
assert(program.flag("output") == true);
assert(program.param("output-dir") == "fun-directory");

Roadmap

  • [x] Basic option parsing
  • [ ] Arguments validation
  • [ ] Examples
  • [ ] Custom types
  • [ ] Compile-time magic
  • [ ] Help message generation
  • [ ] Commands support

License

This code is licensed under the MIT license for Pedro Tacla Yamada. For more information please refer to the LICENSE file.

Authors:
  • Pedro Tacla Yamada
Dependencies:
none
Versions:
1.0.3 2016-Apr-06
1.0.2 2016-Apr-06
1.0.1 2015-Oct-25
~master 2016-Apr-11
~testing/dub 2016-Apr-01
Show all 5 versions
Download Stats:
  • 0 downloads today

  • 0 downloads this week

  • 0 downloads this month

  • 115 downloads total

Score:
0.0
Short URL:
commander.dub.pm