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