Closed scpeters closed 2 years ago
Nice! Works well for me! It would be interesting to document it somewhere, like the README, so users compiling from source know what to do.
added from-source instructions in https://github.com/ignitionrobotics/ign-tools/pull/77/commits/174a600699f34a07403b2330119a5896eb5a1ec5
I also wonder if there's a way of automatically sourcing this file for users compiling from source which is not specific to colcon. Maybe something within the
ign
command itself? Just a thought for the future.
I'm not sure, but I agree that would be nice. Let's keep that in mind for the future
🎉 New feature
Part of https://github.com/ignitionrobotics/ign-tools/issues/1.
Summary
This adds a bash-completion helper based on the script used by gazebo's
gz
command. It currently only autocompletes the names ofign
commands using the output ofign --commands
. Subsequent improvements may add support for autocompleting the-*
arguments and ignition topic and service names. This pull request is intentionally simple to demonstrate the approach.My goal is to emulate the approach taken by the hub command, which hosts its own completion scripts in its
etc
folder.hub
does not install these scripts withmake install
since the install location varies with each operating system distribution. Instead, the installation path is encoded in the homebrew formula and debian metadata. This enablesign
autocompletion support on these two platforms ifbash-completion
is enabled without requiring additional user action. The debian metadata and homebrew formula can be updated with the next prerelease.Test it
Source the script in a terminal window and hit
<TAB>
after typingign
and see the list of available commands.To test a prototype of the homebrew formula, checkout https://github.com/osrf/homebrew-simulation/commit/38ae6c1063c38adbb66ba3995b184f5af8cc2c89 and install
ignition-tools
with the--HEAD
flag. Ifignition-tools
has dependent packages already installed, use the following: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.