Skip to content
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 #81

Merged
merged 16 commits into from
Jun 14, 2022
Merged

Bash completion for flags #81

merged 16 commits into from
Jun 14, 2022

Conversation

mabelzhang
Copy link
Contributor

@mabelzhang mabelzhang commented Apr 30, 2022

🎉 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:

. plugin.bash_completion.sh

If you just tab, you get the default system tab-completion that shows the files in the current directory:

$ ign plugin <tab>

If you type -, and then tab, you get the tab-completion for all the flags available for this subcommand:

$ ign plugin -<tab>
--help      --help-all  --info      --plugin    --verbose   --version   -h          -i          -p          -v          

Then you can type partial flags, and it'll do tab-completion normally for you, such as

$ ign plugin --help<tab>
--help      --help-all  

It also works for multiple flags, like ign plugin --<flag1> --<flag2> ...

Checklist

  • Signed all commits for DCO
  • Added tests
  • Added example and/or tutorial
  • Updated documentation (as needed)
  • Updated migration guide (as needed)
  • Consider updating Python bindings (if the library has them)
  • codecheck passed (See contributing)
  • All tests passed (See test coverage)
  • While waiting for a review on your PR, please help review another open pull request to support the maintainers

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.

Signed-off-by: Mabel Zhang <[email protected]>
@mabelzhang mabelzhang added the OOBE 📦✨ Out-of-box experience label Apr 30, 2022
@mabelzhang mabelzhang requested a review from mxgrey as a code owner April 30, 2022 06:16
@mabelzhang mabelzhang requested a review from ahcorde as a code owner April 30, 2022 06:16
@github-actions github-actions bot added 🏯 fortress Ignition Fortress 🏰 citadel Ignition Citadel labels Apr 30, 2022
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
@chapulina chapulina added the needs upstream release Blocked by a release of an upstream library label May 4, 2022
cmd/CMakeLists.txt Outdated Show resolved Hide resolved
cmd/plugin.bash_completion.sh Outdated Show resolved Hide resolved
CMakeLists.txt Outdated Show resolved Hide resolved
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]>
@mabelzhang
Copy link
Contributor Author

I think the PR comments have been addressed.

Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
@chapulina chapulina requested a review from ahcorde May 23, 2022 16:57
loader/src/ign_TEST.cc Outdated Show resolved Hide resolved
Signed-off-by: Mabel Zhang <[email protected]>
Signed-off-by: Mabel Zhang <[email protected]>
loader/src/ign_TEST.cc Show resolved Hide resolved
@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

❗ No coverage uploaded for pull request base (ign-plugin1@34c360d). Click here to learn what that means.
The diff coverage is n/a.

❗ Current head de65502 differs from pull request most recent head d69a07a. Consider uploading reports for the commit d69a07a to get more accurate results

@@              Coverage Diff               @@
##             ign-plugin1      #81   +/-   ##
==============================================
  Coverage               ?   99.82%           
==============================================
  Files                  ?       15           
  Lines                  ?      584           
  Branches               ?        0           
==============================================
  Hits                   ?      583           
  Misses                 ?        1           
  Partials               ?        0           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 34c360d...d69a07a. Read the comment docs.

Signed-off-by: Louise Poubel <[email protected]>
Copy link
Contributor

@chapulina chapulina left a comment

Choose a reason for hiding this comment

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

@chapulina chapulina enabled auto-merge (squash) June 14, 2022 22:30
@chapulina chapulina merged commit 9d933de into ign-plugin1 Jun 14, 2022
@chapulina chapulina deleted the mabelzhang/tab_completion branch June 14, 2022 22:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel 🏯 fortress Ignition Fortress needs upstream release Blocked by a release of an upstream library OOBE 📦✨ Out-of-box experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants