1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
5 # elogind is free software; you can redistribute it and/or modify it
6 # under the terms of the GNU Lesser General Public License as published by
7 # the Free Software Foundation; either version 2.1 of the License, or
8 # (at your option) any later version.
10 # elogind is distributed in the hope that it will be useful, but
11 # WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 # Lesser General Public License for more details.
15 # You should have received a copy of the GNU Lesser General Public License
16 # along with elogind; If not, see <http://www.gnu.org/licenses/>.
18 zshcompletiondir = get_option('zshcompletiondir')
19 if zshcompletiondir == ''
20 zshcompletiondir = join_paths(datadir, 'zsh/site-functions')
22 message('zsh completions: @0@'.format(zshcompletiondir))
25 if zshcompletiondir != 'no'
26 #if 0 /// elogind has a *very* short list for this...
27 # zsh_systemctl = configure_file(
28 # input : '_systemctl.in',
29 # output : '_systemctl',
30 # configuration : substs)
32 # items = [['_busctl', ''],
33 # ['_journalctl', ''],
34 # ['_systemd-analyze', ''],
35 # ['_systemd-delta', ''],
36 # ['_systemd-nspawn', ''],
38 # ['_systemd-run', ''],
40 # ['_kernel-install', ''],
41 # ['_sd_hosts_or_user_at_host', ''],
42 # ['_sd_outputmodes', ''],
43 # ['_sd_unit_files', ''],
44 # ['_sd_machines', ''],
45 # [zsh_systemctl, ''],
46 # ['_bootctl', 'ENABLE_EFI'],
47 # ['_coredumpctl', 'ENABLE_COREDUMP'],
48 # ['_hostnamectl', 'ENABLE_HOSTNAMED'],
49 # ['_localectl', 'ENABLE_LOCALED'],
50 # ['_loginctl', 'ENABLE_LOGIND'],
51 # ['_machinectl', 'ENABLE_MACHINED'],
52 # ['_networkctl', 'ENABLE_NETWORKD'],
53 # ['_systemd-inhibit', 'ENABLE_LOGIND'],
54 # ['_systemd-resolve', 'ENABLE_RESOLVE'],
55 # ['_systemd-tmpfiles', 'ENABLE_TMPFILES'],
56 # ['_timedatectl', 'ENABLE_TIMEDATED'],
58 items = [['_loginctl', ''],
63 if item[1] == '' or conf.get(item[1]) == 1
65 install_dir : zshcompletiondir)