Skip to content

Add .strictOptionalOptionArguments() for POSIX-style handling of options with optional option-arguments#1951

Closed
aweebit wants to merge 6 commits intotj:developfrom
aweebit:feature/strictOptionalOptionArguments
Closed

Add .strictOptionalOptionArguments() for POSIX-style handling of options with optional option-arguments#1951
aweebit wants to merge 6 commits intotj:developfrom
aweebit:feature/strictOptionalOptionArguments

Conversation

@aweebit
Copy link
Copy Markdown
Contributor

@aweebit aweebit commented Aug 8, 2023

Fixes #1901.

ChangeLog

Added

  • .strictOptionalOptionArguments() for POSIX-style handling of options with optional option-arguments

aweebit added 3 commits August 7, 2023 13:45
Eliminates redundant calls and checks.

(cherry picked from commit dd2c9c8)
- Check if new option is usable with current settings before registering
- Check if registered options remain usable when updating settings

_registerOption() has been borrowed from deb3bdf in tj#1923.
@shadowspawn
Copy link
Copy Markdown
Collaborator

This is something I have been thinking about for years. I will be interested to see how you have approached it, but may choose to do it myself.

@aweebit aweebit force-pushed the feature/strictOptionalOptionArguments branch from baaae81 to 7577e65 Compare August 8, 2023 15:59
@aweebit
Copy link
Copy Markdown
Contributor Author

aweebit commented Aug 8, 2023

(Force pushed to undo the merge with #1950.)

@shadowspawn
Copy link
Copy Markdown
Collaborator

Leaving #1901 open to see if there is any interest or compelling use cases.

There are some extra commits in this PR, the relevant commits to the strict optionals are:

See also a different approach in #1984 where the help shows the flags as supplied by author and up to author to format appropriately.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants