Merged
Conversation
felangel
reviewed
Nov 23, 2022
f61eec3 to
a8a73a9
Compare
a8a73a9 to
13f0598
Compare
82d0404 to
536fb53
Compare
536fb53 to
2eb8c03
Compare
renancaraujo
commented
Nov 24, 2022
| @@ -516,7 +510,6 @@ void main() { | |||
| 'basic usage with args in between', | |||
| forLine: 'example_cli some_other_command subcommand_alias', | |||
| suggests: allOptionsInThisLevel, | |||
| skip: notImplemmentedYet, | |||
Contributor
Author
There was a problem hiding this comment.
Removing skip for cases we support now
renancaraujo
commented
Nov 24, 2022
| /// - [AllOptionsAndCommandsCompletionResult] | ||
| /// - [MatchingCommandsCompletionResult] | ||
| @immutable | ||
| abstract class CompletionResult { |
Contributor
Author
There was a problem hiding this comment.
Refactored command results to have a more specific role, removing responsibilities form the parser, which did too much.
renancaraujo
commented
Nov 24, 2022
Comment on lines
-57
to
-69
| case SystemShell.zsh: | ||
| // On zsh, colon acts as delimitation between a suggestion and its | ||
| // description. Any literal colon should be escaped. | ||
| final suggestion = entry.key.replaceAll(':', r'\:'); | ||
| final description = entry.value?.replaceAll(':', r'\:'); | ||
|
|
||
| logger.info( | ||
| '$suggestion${description != null ? ':$description' : ''}', | ||
| ); | ||
| break; | ||
| case SystemShell.bash: | ||
| logger.info(entry.key); | ||
| break; |
Contributor
Author
There was a problem hiding this comment.
Since we are not varying the "rendering" logic per "CompletionResult" subtype, this is now centralized in the runner and the completion result only contain completions.
| argParser | ||
| ..addOption( | ||
| 'rootOption', | ||
| mandatory: true, // this should be disregarded |
Member
There was a problem hiding this comment.
Disregarded from the test? I am not sure I followed
Contributor
Author
There was a problem hiding this comment.
from the parsing, since we clone options without rules
Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
Co-authored-by: Erick <erickzanardoo@gmail.com>
8630b82 to
a3b11f3
Compare
Co-authored-by: Erick <erickzanardoo@gmail.com>
a3b11f3 to
0c9f361
Compare
erickzanardo
approved these changes
Nov 24, 2022
wolfenrain
approved these changes
Nov 24, 2022
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Status
READY
Description
feat: suggest sub commands
closes #4
Cases covered:
Type of Change