-
Notifications
You must be signed in to change notification settings - Fork 44
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
Bash completion for flags #392
Conversation
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gui3 #392 +/- ##
=========================================
Coverage 31.12% 31.12%
=========================================
Files 29 29
Lines 1343 1343
=========================================
Hits 418 418
Misses 925 925 Continue to review full report at Codecov.
|
Signed-off-by: Mabel Zhang <[email protected]>
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.
Same comments as in plugin
, let's use gz
wherever we can, and see if it's possible to write a test that checks that the flags are the same on the autocomplete file and the command itself.
Signed-off-by: Mabel Zhang <[email protected]>
Codecov Report
@@ Coverage Diff @@
## ign-gui3 #392 +/- ##
=========================================
Coverage 65.45% 65.45%
=========================================
Files 29 29
Lines 3216 3216
=========================================
Hits 2105 2105
Misses 1111 1111 Continue to review full report at Codecov.
|
Signed-off-by: Mabel Zhang <[email protected]>
I think the comments are addressed. Ready for another pass. |
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
…cs/ign-gui into mabelzhang/tab_completion
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Louise Poubel <[email protected]>
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.
Thanks for iterating! It's working for me after I source:
. install/share/gz/gz1.completion
Signed-off-by: Louise Poubel <[email protected]>
Fixed the tests in 2866b7a, inspired by gazebosim/gz-plugin#57 |
@mabelzhang This PR introduced a regression in the Gazebo Citadel Windows buildfarm, see:
Would you please take a look? It seems like an extra environment variable has to be set on Windows to get the proper output from the command line on that test. |
Ah sorry that's on me, I totally missed the failing Windows test. On it. |
🎉 New feature
Part of gazebosim/gz-tools#1
Used together with gazebosim/gz-tools#87
Summary
Bash completion script for flags available to this subcommand.
This is a standalone function that depends on a new script in gazebosim/gz-tools#87 to call this.
Test it
After sourcing the dependent script in ign-tools, source the script in this PR:
If you just tab, you get the default system tab-completion that shows the files in the current directory:
If you type
-
, and then tab, you get the tab-completion for all the flags available for this subcommand:Then you can type partial flags, and it'll do tab-completion normally for you, such as
It also works for multiple flags, like
ign gui --<flag1> --<flag2> ...
Checklist
codecheck
passed (See contributing)Note to maintainers: Remember to use Squash-Merge and edit the commit message to match the pull request summary while retaining
Signed-off-by
messages.