mirror of
https://gitlab.freedesktop.org/upower/power-profiles-daemon.git
synced 2026-05-07 06:08:09 +02:00
trivial: move completions to their own directory
This commit is contained in:
parent
0c301fe93f
commit
000dd5d699
2 changed files with 32 additions and 31 deletions
31
src/completions/meson.build
Normal file
31
src/completions/meson.build
Normal file
|
|
@ -0,0 +1,31 @@
|
|||
generate_completion = [python3, powerprofilesctl, '--print-completion']
|
||||
if bashcomp.found()
|
||||
completions_dir = bashcomp.get_variable(pkgconfig: 'completionsdir',
|
||||
pkgconfig_define: bashcomp.version().version_compare('>= 2.10') ?
|
||||
['datadir', get_option('datadir')] : ['prefix', prefix],
|
||||
)
|
||||
|
||||
custom_target('bash-completion',
|
||||
output: 'powerprofilesctl',
|
||||
command: [
|
||||
generate_completion,
|
||||
'bash',
|
||||
],
|
||||
capture: true,
|
||||
install: true,
|
||||
install_dir: completions_dir,
|
||||
)
|
||||
endif
|
||||
|
||||
if zshcomp
|
||||
custom_target('zsh-completion',
|
||||
output: '_powerprofilesctl',
|
||||
command: [
|
||||
generate_completion,
|
||||
'zsh',
|
||||
],
|
||||
capture: true,
|
||||
install: true,
|
||||
install_dir: get_option('zshcomp'),
|
||||
)
|
||||
endif
|
||||
|
|
@ -147,34 +147,4 @@ if argparse_manpage.found()
|
|||
))
|
||||
endif
|
||||
|
||||
generate_completion = [python3, powerprofilesctl, '--print-completion']
|
||||
if bashcomp.found()
|
||||
completions_dir = bashcomp.get_variable(pkgconfig: 'completionsdir',
|
||||
pkgconfig_define: bashcomp.version().version_compare('>= 2.10') ?
|
||||
['datadir', get_option('datadir')] : ['prefix', prefix],
|
||||
)
|
||||
|
||||
custom_target('bash-completion',
|
||||
output: 'powerprofilesctl',
|
||||
command: [
|
||||
generate_completion,
|
||||
'bash',
|
||||
],
|
||||
capture: true,
|
||||
install: true,
|
||||
install_dir: completions_dir,
|
||||
)
|
||||
endif
|
||||
|
||||
if zshcomp
|
||||
custom_target('zsh-completion',
|
||||
output: '_powerprofilesctl',
|
||||
command: [
|
||||
generate_completion,
|
||||
'zsh',
|
||||
],
|
||||
capture: true,
|
||||
install: true,
|
||||
install_dir: get_option('zshcomp'),
|
||||
)
|
||||
endif
|
||||
subdir('completions')
|
||||
Loading…
Add table
Reference in a new issue