Positionals (added in 1.4) currently ignore the Required option. It should be supported, with these basic requirements:
- Required positionals must have a value supplied by the user (not by Default) or an error is thrown
- If a positional is set to required, throw an error if there are already any positionals on this command which are NOT required
-- This is necessary in order to avoid ambiguity of positional argument satisfaction: Say you have two positionals, the first is optional and the second is required. The user gives one value on the CLI. Which positional gets the value? Does the required positional get it IFF the optional has a default?
-- Do not throw an error if there are optional positionals on a parent command of the command which has had Required positionals added
- Allow optional positionals to follow Required positionals
- Do not throw an error if there are Required positionals on commands which did not Happen
Some discussion of the problem is warranted before coding begins. This may not be an exhaustive list of requirements.
Positionals (added in 1.4) currently ignore the Required option. It should be supported, with these basic requirements:
-- This is necessary in order to avoid ambiguity of positional argument satisfaction: Say you have two positionals, the first is optional and the second is required. The user gives one value on the CLI. Which positional gets the value? Does the required positional get it IFF the optional has a default?
-- Do not throw an error if there are optional positionals on a parent command of the command which has had Required positionals added
Some discussion of the problem is warranted before coding begins. This may not be an exhaustive list of requirements.