chiark / gitweb /
Drop my copyright headers
[elogind.git] / shell-completion / zsh / meson.build
1 # SPDX-License-Identifier: LGPL-2.1+
2
3 zshcompletiondir = get_option('zshcompletiondir')
4 if zshcompletiondir == ''
5         zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
6
7         message('zsh completions: @0@'.format(zshcompletiondir))
8 endif
9
10 if zshcompletiondir != 'no'
11 #if 0 /// elogind has a *very* short list for this...
12 #         zsh_systemctl = configure_file(
13 #                 input : '_systemctl.in',
14 #                 output : '_systemctl',
15 #                 configuration : substs)
16
17 #         items = [['_busctl',                   ''],
18 #                  ['_journalctl',               ''],
19 #                  ['_systemd-analyze',          ''],
20 #                  ['_systemd-delta',            ''],
21 #                  ['_systemd-nspawn',           ''],
22 #                  ['_systemd',                  ''],
23 #                  ['_systemd-run',              ''],
24 #                  ['_udevadm',                  ''],
25 #                  ['_kernel-install',           ''],
26 #                  ['_sd_hosts_or_user_at_host', ''],
27 #                  ['_sd_outputmodes',           ''],
28 #                  ['_sd_unit_files',            ''],
29 #                  ['_sd_machines',              ''],
30 #                  [zsh_systemctl,               ''],
31 #                  ['_bootctl',                  'ENABLE_EFI'],
32 #                  ['_coredumpctl',              'ENABLE_COREDUMP'],
33 #                  ['_hostnamectl',              'ENABLE_HOSTNAMED'],
34 #                  ['_localectl',                'ENABLE_LOCALED'],
35 #                  ['_loginctl',                 'ENABLE_LOGIND'],
36 #                  ['_machinectl',               'ENABLE_MACHINED'],
37 #                  ['_networkctl',               'ENABLE_NETWORKD'],
38 #                  ['_systemd-inhibit',          'ENABLE_LOGIND'],
39 #                  ['_systemd-resolve',          'ENABLE_RESOLVE'],
40 #                  ['_systemd-tmpfiles',         'ENABLE_TMPFILES'],
41 #                  ['_timedatectl',              'ENABLE_TIMEDATED'],
42 #else
43         items = [['_loginctl',            ''],
44 #endif // 0
45                 ]
46
47         foreach item : items
48                 if item[1] == '' or conf.get(item[1]) == 1
49                         install_data(item[0],
50                                      install_dir : zshcompletiondir)
51                 endif
52         endforeach
53 endif