Skip to content

Implemented option to delay treating non-flags as haltable#457

Closed
Toberumono wants to merge 1 commit intoyargs:mainfrom
Toberumono:delay-treating-non-flags-as-invalid-options
Closed

Implemented option to delay treating non-flags as haltable#457
Toberumono wants to merge 1 commit intoyargs:mainfrom
Toberumono:delay-treating-non-flags-as-invalid-options

Conversation

@Toberumono
Copy link
Copy Markdown

This is a temporary solution that allows for most of the halt-at-non-option functionality to work with subcommands and is based on some problems revealed by #438 and #453. Ideally this will be replaced in the future by having yargs-parser support command words (see the later discussion in #456 for details).

The flag name is open for changes. I'm terrible at naming things.

@bcoe
Copy link
Copy Markdown
Member

bcoe commented Aug 9, 2022

@Toberumono these test cases are useful, but I'm hesitant to introduce the config option wait-for-first-flag-before-filtering-options.

This feels very much like a case of https://xkcd.com/1172/, and I'd rather figure out an approach to solving this problem that's more intuitive.

@bcoe bcoe closed this Aug 9, 2022
@bcoe
Copy link
Copy Markdown
Member

bcoe commented Aug 9, 2022

@Toberumono I left some comments on #453, I think I need to better understand your use case before I have an opinion about a fix (or adding an additional config setting).

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.

3 participants