Skip to content

Conversation

@nak3
Copy link
Contributor

@nak3 nak3 commented Feb 17, 2018

Currently, suggestions for "unknown command" are not working for
subcommands.

This patch supports new validation of positional arguments as
OnlySubCommands. It accepts only subcommands if enabled, and also
findSuggestions() will be called.

Fixes #636

README.md Outdated
- `NoArgs` - the command will report an error if there are any positional args.
- `ArbitraryArgs` - the command will accept any args.
- `OnlyValidArgs` - the command will report an error if there are any positional args that are not in the `ValidArgs` field of `Command`.
- `OnlySubCommands` - the command will report an error if if any args are included except for subcommands.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typo error in an error if if any args

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Perif Updated.

nak3 added 2 commits May 31, 2018 10:32
Currently, suggestions for "unknown command" are not working for
subcommands.

This patch supports new validation of positional arguments as
`OnlySubCommands`. It accepts only subcommands if enabled, and also
`findSuggestions()` will be called.
@github-actions
Copy link

This PR is being marked as stale due to a long period of inactivity

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.

RFE: Support OnlySubCommands arg validation to make subcommand get suggestions

2 participants