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

Install completion script to bash-completions #4

Merged
merged 1 commit into from
Mar 11, 2022

Conversation

scpeters
Copy link
Contributor

@scpeters scpeters commented Mar 11, 2022

Install the ign completion script to /usr/share/bash-completion/completions/ to allow it to be used automatically. This approach is based on the approach used by the hub command, which installs the completion script to platform specific locations in the debian metadata, rather than attempting to encode these locations in cmake.

Note that hub.install uses dh-exec-install, which allows the file to be renamed upon installation. This command has three requirements:

  • The package must be using compatibility level 9 or later (see debhelper(7))

  • The package will need a build-dependency on dh-exec.

  • The install file must be marked as executable.

Follow-up to gazebosim/gz-tools#77 and related to gazebosim/gz-tools#1.

Testing

This branch has been tested in the following nightly debbuild job:

I recommend downloading the .deb artifact and installing it with dpkg -i and then running the instructions from gazebosim/gz-tools#77.

Source the script in a terminal window and hit <TAB> after typing ign and see the list of available commands.

Installing the ign completion script to
/usr/share/bash-completion/completions/
should allow it to be used automatically.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
@scpeters scpeters merged commit dba5ace into main Mar 11, 2022
@scpeters scpeters deleted the scpeters/install_completion branch March 11, 2022 18:49
scpeters added a commit that referenced this pull request Mar 15, 2022
Follow-up to #4 to fix the bionic build.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
j-rivero pushed a commit that referenced this pull request Mar 15, 2022
Follow-up to #4 to fix the bionic build.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants