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 #1504

Merged
merged 16 commits into from
Jun 15, 2022
Merged

Bash completion for flags #1504

merged 16 commits into from
Jun 15, 2022

Conversation

mabelzhang
Copy link
Contributor

@mabelzhang mabelzhang commented May 21, 2022

🎉 New feature

Part of gazebosim/gz-tools#1
Used together with gazebosim/gz-tools#87

Summary

Bash completion, installation, tests.

Test it

$ . install/share/gz/gz.completion

$ ign gazebo -
--force-version         --physics-engine        --verbose
--gui-config            --playback              --version
--help                  --record                --versions
--iterations            --record-path           -g
--levels                --record-resources      -h
--log-compress          --record-topic          -r
--log-overwrite         --render-engine         -s
--network-role          --render-engine-gui     -v
--network-secondaries   --render-engine-server  -z

$ ign model -
--force-version  --list           -h               -p
--help           --model          -j               
--joint          --pose           -l               
--link           --versions       -m

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]>
Signed-off-by: Mabel Zhang <[email protected]>
@mabelzhang mabelzhang added the OOBE 📦✨ Out-of-box experience label May 21, 2022
@mabelzhang mabelzhang added this to Inbox in Core development via automation May 21, 2022
@mabelzhang mabelzhang moved this from Inbox to In review in Core development May 21, 2022
@codecov
Copy link

codecov bot commented May 21, 2022

Codecov Report

Merging #1504 (7c0f3b9) into ign-gazebo3 (900583a) will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff              @@
##           ign-gazebo3    #1504   +/-   ##
============================================
  Coverage        77.76%   77.76%           
============================================
  Files              250      250           
  Lines            14443    14443           
============================================
  Hits             11231    11231           
  Misses            3212     3212           

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 900583a...7c0f3b9. Read the comment docs.

Signed-off-by: Mabel Zhang <[email protected]>
@chapulina chapulina added the needs upstream release Blocked by a release of an upstream library label May 23, 2022
@chapulina chapulina requested a review from ahcorde May 23, 2022 16:57
@chapulina chapulina added the 🏰 citadel Ignition Citadel label May 23, 2022
src/cmd/gazebo.bash_completion.sh Show resolved Hide resolved
src/cmd/gazebo.bash_completion.sh Show resolved Hide resolved
src/ign_TEST.cc Outdated Show resolved Hide resolved
Signed-off-by: Mabel Zhang <[email protected]>
Copy link
Contributor

@ahcorde ahcorde left a comment

Choose a reason for hiding this comment

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

CI is failing to compile

  /github/workspace/src/ign_TEST.cc: In member function 'virtual void CmdLine_GazeboHelpVsCompletionFlags_Test::TestBody()':
  /github/workspace/src/ign_TEST.cc:199:28: error: 'common' has not been declared
     std::string scriptPath = common::joinPaths(std::string(PROJECT_SOURCE_PATH),
                              ^~~~~~

@mabelzhang
Copy link
Contributor Author

Oops my Docker image was broken yesterday and I couldn't test things locally. Relying on CI

@mabelzhang
Copy link
Contributor Author

b34bbe9 adds bash completion for the model command and tests it in a new way as described in gazebosim/gz-gui#392 (comment)

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]>
src/cmd/CMakeLists.txt Outdated Show resolved Hide resolved
@chapulina chapulina removed the needs upstream release Blocked by a release of an upstream library label Jun 14, 2022
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.

Pushed some minor tweaks in 7c0f3b9. LGTM!

@chapulina chapulina merged commit dc5f117 into ign-gazebo3 Jun 15, 2022
@chapulina chapulina deleted the mabelzhang/tab_completion branch June 15, 2022 17:59
Core development automation moved this from In review to Done Jun 15, 2022
@chapulina chapulina moved this from Done to Highlights in Core development Jun 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏰 citadel Ignition Citadel OOBE 📦✨ Out-of-box experience
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

3 participants