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
Prev Previous commit
Next Next commit
install to versioned place
Signed-off-by: Mabel Zhang <[email protected]>
mabelzhang committed May 20, 2022
commit f93b59d396a4d295b357abf007ea6050f65a4ba1
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -38,6 +38,9 @@ ign_find_package(DL
#--------------------------------------
# Find ignition-tools
find_program(IGN_TOOLS_PROGRAM ign)
if (IGN_TOOLS_PROGRAM)
set(IGN_TOOLS_VER 1)
endif()


#============================================================================
14 changes: 11 additions & 3 deletions loader/conf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -26,6 +26,14 @@ configure_file(
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${IGN_DESIGNATION}${PROJECT_VERSION_MAJOR}.yaml
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/ignition/)

# Install the bash completion script in an unversioned location.
install(FILES plugin.bash_completion.sh
DESTINATION ${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/gz.completion.d/)
# Tack version onto and install the bash completion script
configure_file(
"plugin.bash_completion.sh"
"${CMAKE_CURRENT_BINARY_DIR}/plugin${PROJECT_VERSION_MAJOR}.bash_completion.sh" @ONLY)
if (IGN_TOOLS_PROGRAM)
install(
FILES
${CMAKE_CURRENT_BINARY_DIR}/plugin${PROJECT_VERSION_MAJOR}.bash_completion.sh
DESTINATION
${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DATAROOTDIR}/gz/gz${IGN_TOOLS_VER}.completion.d)
endif()