Skip to content

Ability to count number of flag occurrences as value #16

@CEbbinghaus

Description

@CEbbinghaus

Imaginary Syntax:

class Settings : CommandSettings {
	[CommandOption("-v|--verbose")]
	[Description("How verbose the logging should be. can be increased with multiple -v options")]
	[FlagCount]
	public required FlagValue<int> Verbosity { get; set; }
}

This system would allow for capturing the number of times a flag has been provided as the value to the flag itself. so -v would be 1 -v -v or -vv would be 2 and so on. In particular this would allow for easy verbosity configuration via -v for "increase verbosity" command -vv (aka trace) or -q for "decrease verbosity" command -qqq (aka critical).

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