]> git.ipfire.org Git - thirdparty/systemd.git/blame - shell-completion/zsh/meson.build
zsh: add systemd-path completions
[thirdparty/systemd.git] / shell-completion / zsh / meson.build
CommitLineData
3a726fcd 1# SPDX-License-Identifier: LGPL-2.1+
3a726fcd 2
5c23128d
ZJS
3zshcompletiondir = get_option('zshcompletiondir')
4if zshcompletiondir == ''
37efbbd8 5 zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
5c23128d
ZJS
6endif
7
8if zshcompletiondir != 'no'
37efbbd8
ZJS
9 zsh_systemctl = configure_file(
10 input : '_systemctl.in',
11 output : '_systemctl',
12 configuration : substs)
5c23128d 13
37efbbd8
ZJS
14 items = [['_busctl', ''],
15 ['_journalctl', ''],
16 ['_systemd-analyze', ''],
17 ['_systemd-delta', ''],
18 ['_systemd-nspawn', ''],
19 ['_systemd', ''],
cf18af82 20 ['_systemd-path', ''],
37efbbd8
ZJS
21 ['_systemd-run', ''],
22 ['_udevadm', ''],
23 ['_kernel-install', ''],
24 ['_sd_hosts_or_user_at_host', ''],
25 ['_sd_outputmodes', ''],
26 ['_sd_unit_files', ''],
27 ['_sd_machines', ''],
28 [zsh_systemctl, ''],
29 ['_bootctl', 'ENABLE_EFI'],
30 ['_coredumpctl', 'ENABLE_COREDUMP'],
31 ['_hostnamectl', 'ENABLE_HOSTNAMED'],
32 ['_localectl', 'ENABLE_LOCALED'],
33 ['_loginctl', 'ENABLE_LOGIND'],
34 ['_machinectl', 'ENABLE_MACHINED'],
35 ['_networkctl', 'ENABLE_NETWORKD'],
36 ['_systemd-inhibit', 'ENABLE_LOGIND'],
f65ccde2 37 ['_resolvectl', 'ENABLE_RESOLVE'],
37efbbd8
ZJS
38 ['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
39 ['_timedatectl', 'ENABLE_TIMEDATED'],
40 ]
5c23128d 41
37efbbd8 42 foreach item : items
349cc4a5 43 if item[1] == '' or conf.get(item[1]) == 1
37efbbd8
ZJS
44 install_data(item[0],
45 install_dir : zshcompletiondir)
46 endif
47 endforeach
5c23128d 48endif