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