Skip to content

support for slice and/or array types - multiple values on one option #8

@ktiy

Description

@ktiy

not sure how to word this one;
it would be cool to have support for slice and/or array types for multiple values on one option

const options = try argsParser.parse(struct {
    outputs: ?[][]const u8 = null, // slice, "--outputs output1 output2 etc."
    resolution: ?[2]u32 = null, // array, "--resolution 1920 1080"

    pub const shorthands = .{
        .r = "resolution",
        .o = "outputs",
    };
}, &args, argsAllocator);

im not sure how difficult this would be to implement though ^_^;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions