Skip to content

Fix --help in nested subcommands with default subcommands#866

Open
stackotter wants to merge 1 commit intoapple:mainfrom
stackotter:stackotter/fix_865
Open

Fix --help in nested subcommands with default subcommands#866
stackotter wants to merge 1 commit intoapple:mainfrom
stackotter:stackotter/fix_865

Conversation

@stackotter
Copy link

@stackotter stackotter commented Feb 13, 2026

This fixes the issue discussed in #865. I updated the implementation of checkForBuiltInFlags's requireSoloArgument parameter to explicitly check for a single input argument rather than a single parsed argument, as some input arguments get parsed into multiple synthetic arguments, for example -help -> [-help, -h, -e, -l, -p]. #612 was trying to do this but did it in a bit of a hacky way that introduced #865. I have added a unit test that fails without these changes and succeeds with them.

Checklist

  • I've added at least one test that validates that my change is working, if appropriate
  • I've followed the code style of the rest of the project
  • I've read the Contribution Guidelines
  • I've updated the documentation if necessary

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