Commit abb8d5b4 authored by Jonathan Hanks's avatar Jonathan Hanks

Name and installation path changes.

Name everything ligo_channel_completion.
Put the executable in /usr/lib.
Put the bash script in /usr/share/bash-completion/completions.
parent c37e508e
......@@ -31,6 +31,6 @@ endmacro()
add_subdirectory(bash)
add_executable(channel_completion channel_completion.cpp)
target_requires_cpp11(channel_completion PUBLIC)
install(TARGETS channel_completion DESTINATION bin)
\ No newline at end of file
add_executable(ligo_channel_completion channel_completion.cpp)
target_requires_cpp11(ligo_channel_completion PUBLIC)
install(TARGETS ligo_channel_completion DESTINATION lib)
\ No newline at end of file
......@@ -36,11 +36,15 @@ Example (starting from the source directory)
<pre>
mkdir build
cd build
cmake ..
cmake .. -DCMAKE_INSTALL_PREFIX=/usr
make
make install
</pre>
Components installed (Assuming a install prefix of /usr):
* a binary ligo_channel_completion to /usr/lib
* a shell script to the base completion libraries at /usr/share/bash-completion/completions
After the install is successful, start a new bash shell and use the channel completion.
<pre>
......
configure_file(channel_completion ${CMAKE_CURRENT_BINARY_DIR}/channel_completion @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/channel_completion"
DESTINATION ${CMAKE_INSTALL_FULL_SYSCONFDIR}/etc/bash_completion.d )
\ No newline at end of file
configure_file(ligo_channel_completion.in ${CMAKE_CURRENT_BINARY_DIR}/ligo_channel_completion @ONLY)
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ligo_channel_completion"
DESTINATION ${CMAKE_INSTALL_PREFIX}/share/bash-completion/completions)
\ No newline at end of file
......@@ -14,7 +14,7 @@ _channel_completion()
# see https://stackoverflow.com/questions/10528695/how-to-reset-comp-wordbreaks-without-affecting-other-completion-script/12495480#12495480
_get_comp_words_by_ref -n : cur
COMPREPLY=( $(@CMAKE_INSTALL_PREFIX@/bin/channel_completion "${cur}") )
COMPREPLY=( $(@CMAKE_INSTALL_PREFIX@/lib/ligo_channel_completion "${cur}") )
__ltrim_colon_completions "$cur"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment