diff --git a/completions/README.md b/completions/README.md index ca313747..37112a43 100644 --- a/completions/README.md +++ b/completions/README.md @@ -1,11 +1,10 @@ # Shell completion scripts -By default, rmw completions are installed when rmw is installed (This can be -disabled by using '-Dinstall_shell_completions' during meson setup). If they -aren't present on your system, you can install a shell completion manually by -getting the completion from the rmw source package or git repository. See the -links below for specific installation instructions for each completion. - +By default, rmw completions are copied to the rmw documentation dir when rmw +is installed. If they aren't present on your system, you can install a shell +completion manually by getting the completion from the source package or git +repository. See the links below for specific installation instructions for +each completion. ## Fish diff --git a/completions/meson.build b/completions/meson.build deleted file mode 100644 index fbc72e8c..00000000 --- a/completions/meson.build +++ /dev/null @@ -1,18 +0,0 @@ -fish_comp = dependency('fish', required: false) - -if get_option('install_shell_completions') - fish_files = files( - join_paths('fish', 'rmw.fish'), - ) - - # default location - fish_install_dir = join_paths(get_option('datadir'), 'fish', 'vendor_completions.d') - - if fish_comp.found() - # when needed we overload the variable - fish_install_dir = fish_comp.get_variable('completionsdir') - endif - - install_data(fish_files, install_dir: fish_install_dir) -endif - diff --git a/meson.build b/meson.build index 0717654d..f540b413 100644 --- a/meson.build +++ b/meson.build @@ -72,10 +72,6 @@ main_bin = executable( subdir ('man') -if get_option('install_shell_completions') - subdir('completions') -endif - if get_option('build_tests') subdir ('test') endif @@ -91,3 +87,10 @@ install_data( ), install_dir : get_option('docdir') ) + +# Copy completions to docdir +install_subdir( + 'completions', + install_dir : join_paths(get_option('docdir')), + strip_directory : false + )