Skip to content

fix: rewrite isUnknownOption as stripped down full parse #507

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

shadowspawn
Copy link
Member

There have been a lot of issues related to unknown-options-as-args. I had a look at rewriting isUnknownOption based directly on the full parser to see how much code was needed to do "real" parsing. Not too bad. (Alternative PRs coming with lighter weight approach, patching the existing code!)

Open Issues: #312 #359 #376 #501

Closed Issues: #226 #231 #386 #437 #453

Open Pull Requests: #502

Closed Pull Requests #207 #227 #238 #326 #386 #394 #400 #438 #456 #458

@shadowspawn
Copy link
Member Author

shadowspawn commented Jul 25, 2025

I was frustrated by ongoing issues with unknown-options-as-args, and some regexp that seemed misguided, and thought a rewrite might be justified. As I learnt more, I found I could eliminate some regexp and fix the known issues in light-weight way.

Wanted to post the work in case useful to look at again in future.

I think a full rewrite is too much churn for now so I'll close PR.

@shadowspawn
Copy link
Member Author

I liked the hasAnyFlag rewrite which was part of this. I could do that as a separate PR if wanted.

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.

1 participant