Skip to content

Releases: malyjacob/d-cmdline

v1.4.2

01 Oct 16:38
Compare
Choose a tag to compare
add manly new apis and fix manly bugs

v1.4.1

28 Sep 03:55
Compare
Choose a tag to compare
change version to 1.4.1

v1.4.0

28 Sep 02:14
Compare
Choose a tag to compare
add maly useful apis in cmdline.ext, fix maly bugs and rewrite  most …

v1.3.4

24 Sep 03:28
Compare
Choose a tag to compare
change version to 1.3.4

v1.3.3

22 Aug 16:45
Compare
Choose a tag to compare

enable a break-through new way to build a command line program intuitively like this sample code or the following code:

module examples.strutil;

import std.stdio;
import std.string;
import cmdline;

struct StrutilResult {
    mixin DESC!("CLI to some string utilities");
    mixin VERSION!("0.0.1");
    JoinResult* joinSub;
    SplitResult* splitSub;
}

struct SplitResult {
    mixin DESC!("Split a string into substrings and display as an array.");
    ArgVal!string str;
    mixin DESC!(str, "string to split");
    OptVal!(string, "-s <char>") separator;
    mixin DESC!(separator, "separator character");
    mixin DEFAULT!(separator, ",");

    void action() {
        writeln(split(str.get, separator.get));
    }
}

struct JoinResult {
    mixin DESC!("Join the command-arguments into a single string.");
    ArgVal!(string[]) strs;
    mixin DESC!(strs, "one or more string");
    OptVal!(string, "-s <char>") separator;
    mixin DESC!(separator, "separator character");
    mixin DEFAULT!(separator, ",");

    void action() {
        writeln(strs.get.join(separator.get));
    }
}

void main(in string[] argv) {
    argv.run!StrutilResult;
}

the details you can see are in sub-module cmdline.ext

v1.3.2

01 Aug 09:26
Compare
Choose a tag to compare
add function getParent run in cmdline.ext

v1.2.0

12 Jul 11:48
Compare
Choose a tag to compare
change the config option as a variadic option which can make command …

v1.1.0

06 Jul 10:05
Compare
Choose a tag to compare
add a feature that are allowed to assign arguments on command line to…

v1.0.2

04 Jul 08:44
Compare
Choose a tag to compare
change the version from 1.0.1 to 1.0.2

v1.0.1

30 Jun 14:29
Compare
Choose a tag to compare
change version 1.0.1 in dub.json