1 # SPDX-License-Identifier: LGPL-2.1+
3 # Copyright 2017 Zbigniew Jędrzejewski-Szmek
5 bashcompletiondir = get_option('bashcompletiondir')
6 if bashcompletiondir == ''
7 bash_completion = dependency('bash-completion', required : false)
8 if bash_completion.found()
9 bashcompletiondir = bash_completion.get_pkgconfig_variable('completionsdir')
11 bashcompletiondir = join_paths(datadir, 'bash-completion/completions')
14 message('bash completions: @0@'.format(bashcompletiondir))
17 if bashcompletiondir != 'no'
18 #if 0 /// elogind has a *very* short list for this...
19 # bash_systemctl = configure_file(
20 # input : 'systemctl.in',
21 # output : 'systemctl',
22 # configuration : substs)
24 # items = [['busctl', ''],
26 # ['systemd-analyze', ''],
27 # ['systemd-cat', ''],
28 # ['systemd-cgls', ''],
29 # ['systemd-cgtop', ''],
30 # ['systemd-delta', ''],
31 # ['systemd-detect-virt', ''],
32 # ['systemd-nspawn', ''],
33 # ['systemd-path', ''],
34 # ['systemd-run', ''],
36 # ['kernel-install', ''],
37 # [bash_systemctl, ''],
38 # ['bootctl', 'ENABLE_EFI'],
39 # ['coredumpctl', 'ENABLE_COREDUMP'],
40 # ['hostnamectl', 'ENABLE_HOSTNAMED'],
41 # ['localectl', 'ENABLE_LOCALED'],
42 # ['loginctl', 'ENABLE_LOGIND'],
43 # ['machinectl', 'ENABLE_MACHINED'],
44 # ['networkctl', 'ENABLE_NETWORKD'],
45 # ['portablectl', 'ENABLE_PORTABLED'],
46 # ['resolvectl', 'ENABLE_RESOLVE'],
47 # ['systemd-resolve', 'ENABLE_RESOLVE'],
48 # ['timedatectl', 'ENABLE_TIMEDATED'],
50 items = [['loginctl', ''],
55 if item[1] == '' or conf.get(item[1]) == 1
57 install_dir : bashcompletiondir)