Adds an option which expects a specified type for its value with an environment variable fallback.
public static TCommand Add<TCommand, T>(this TCommand command, string prototype, string? description, Action<T> action, string envVar, char? envVarDelimiter, bool hidden)
where TCommand : CommandContainer where T : ISpanParsable<T>
The command to add the option to.
The prototype of the option. E.g "v|version".
The help description for this option.
The associated action.
The environment variable used as a fallback value.
Optional delimiter used to split multiple fallback values.
A boolean indicating if this option is hidden from help.