-
Notifications
You must be signed in to change notification settings - Fork 29.7k
Add Bash and Zsh command-line completion for flutter #19243
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
Conversation
96852ab to
f454e97
Compare
|
I'm not a good person to review this. Thoughts, @Hixie ? |
|
OK, I really just wanted to make sure I was using your package the way it was intended. |
|
It looks okay to me. Were you able to wire up completion and use it?
…On Wed, Jul 11, 2018 at 1:50 PM Greg Spencer ***@***.***> wrote:
OK, I really just wanted to make sure I was using your package the way it
was intended.
—
You are receiving this because your review was requested.
Reply to this email directly, view it on GitHub
<#19243 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AABCipGNg3x7Y_7o69cJ5Zg1_Sw2irRuks5uFmUMgaJpZM4VKZ6d>
.
|
|
Yep, it works. The performance is "reasonable". I wouldn't call it fast, but it's definitely usable. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This description seems out of place here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whoops, yeah, removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you explain the purpose of this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, the CommandRunner from the args package calls argParser.parse(args) where this calls tryArgsCompletion(args, argParser). This is where the completion package hooks into things in order to interrogate the argParser and do its magic.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you include a big comment that explains all this? Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I already did...or are you saying it isn't big/explain-y enough?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I was reviewing an older copy of the PR.
|
tests? |
|
Added the missing test file (forgot to Also, added support for specifying an output file instead of only writing to stdout. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/tracking/analytics recording/
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, and fixed in config.dart too (where a similar comment was).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivial nit: trailing comma and newline before )
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
|
cc @tvolkert who may also have opinions |
* flutter_master: (810 commits) Revert engine roll to 316b026 roll engine to 316b026 (flutter#19419) Revert "enable lint unnecessary_const (flutter#19342)" (flutter#19423) enable lint unnecessary_const (flutter#19342) Chevrons in month picker are semi-transparent when the month is scrolled (flutter#19363) Revert "Use FlutterProject to locate files (flutter#18913)" (flutter#19409) Extra debug information in run_release_test (flutter#19405) Fix typo (flutter#19402) Use FlutterProject to locate files (flutter#18913) Revert "roll engine to 9af920e (flutter#19365)" (flutter#19376) roll engine to 9af920e (flutter#19365) increase cache size if image is loaded that is larger than max size (flutter#19352) Add Bash and Zsh command-line completion for flutter (flutter#19243) Support keyboardAppearance field for iOS (flutter#19244) Add option to silence driver extension errors (flutter#19247) Add HeroController to CupertinoApp (flutter#19326) have text finder convert Text.rich to plain text for comparison (flutter#19270) Correct contentPadding type in InputDecoration.debugFillProperties (flutter#19318) Revert "Revert "Use runTests in fuchsia tester. (flutter#19178)" (flutter#19321)" (flutter#19327) Roll engine to c5a63d (flutter#19288) ...
This uses @kevmoo's completion package to do command line completion for flutter, and a new command "bash-completion" (with alias "zsh-completion") that will output the necessary shell script setup code, and adds the hidden command "completion" that does the actual completion. Because it adds a dependency, I also had to do flutter update-packages --force-upgrade. Fixes flutter#18988.
|
Is there any process to activate it ? |
|
Yes, in the help for the flutter bash-completion flutter_completion.shand it will write a completion setup script. You then You might also place the |
This uses @kevmoo's completion package to do command line completion for flutter, and a new command "bash-completion" (with alias "zsh-completion") that will output the necessary shell script setup code, and adds the hidden command "completion" that does the actual completion.
Because it adds a dependency, I also had to do
flutter update-packages --force-upgrade.Fixes #18988.