]> git.ipfire.org Git - thirdparty/knot-resolver.git/commitdiff
manager: meson: install shell completion scripts
authorAleš Mrázek <ales.mrazek@nic.cz>
Tue, 15 Nov 2022 17:15:08 +0000 (18:15 +0100)
committerAleš Mrázek <ales.mrazek@nic.cz>
Tue, 10 Jan 2023 18:57:14 +0000 (19:57 +0100)
manager/meson.build
manager/shell-completion/meson.build [new file with mode: 0644]
meson.build

index b4be63f9038015a26a541c223788db22e6842742..c80301dce512e7f2329489d34ab4680ccea77995 100644 (file)
@@ -23,6 +23,9 @@ endif
 
 if build_manager
 
+    # shell completion
+    subdir('shell-completion')
+
     # installation script
     meson.add_install_script('scripts/install.sh', py3.path())
 
diff --git a/manager/shell-completion/meson.build b/manager/shell-completion/meson.build
new file mode 100644 (file)
index 0000000..6c35ffe
--- /dev/null
@@ -0,0 +1,13 @@
+# CLI comletion for bash-shell
+install_data(
+    sources: 'client.bash',
+    rename: 'kresctl',
+    install_dir: completion_dir / 'bash-completion' / 'completions'
+  )
+
+# CLI completion for fish-shell
+install_data(
+    sources: 'client.fish',
+    rename: 'kresctl.fish',
+    install_dir: completion_dir / 'fish' / 'completions'
+  )
index 440502900e58ee8cea2a30902fda3c5d841c95f0..f67daf4cbb20858fc06cb52f6f1592de6f00f455 100644 (file)
@@ -59,7 +59,7 @@ systemd_cache_dir = prefix / get_option('localstatedir') / 'cache' / 'knot-resol
 systemd_unit_dir = prefix / 'lib' / 'systemd' / 'system'
 systemd_tmpfiles_dir = prefix / 'lib' / 'tmpfiles.d'
 systemd_sysusers_dir = prefix / 'lib' / 'sysusers.d'
-completions_dir = prefix / 'share'
+completion_dir = prefix / 'share'
 mod_inc_dir = include_directories('.', 'contrib/')
 
 ## Trust anchors