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