Hash :
1c1542d6
Author :
Date :
2023-09-29T20:44:06
Tools: Add bash completions for xkbcli
- Add bash completion script. It parses the commands help messages to
provide the completions, thus any new subcommand or option will be
supported, as long as it has its entry in the help messages. This
should result in low maintenancei effort.
- Add installation entry in Meson. The path can be configured using
the following options:
- `enable-bash-completion` to enable the installation;
- `bash-completion-path` to control the installation path. It will
default to: `share/bash-completion/completions`.
TODO: completion for other shells, such as zsh?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92
option(
'xkb-config-root',
type: 'string',
description: 'The XKB config root [default=xkeyboard-config install path]',
)
option(
'xkb-config-extra-path',
type: 'string',
description: 'Extra lookup path for system-wide XKB data [default=$sysconfdir/xkb]',
)
option(
'x-locale-root',
type: 'string',
description: 'The X locale root [default=$datadir/X11/locale]',
)
option(
'bash-completion-path',
type: 'string',
description: 'Directory for bash completion scripts'
)
option(
'default-rules',
type: 'string',
value: 'evdev',
description: 'Default XKB ruleset',
)
option(
'default-model',
type: 'string',
value: 'pc105',
description: 'Default XKB model',
)
option(
'default-layout',
type: 'string',
value: 'us',
description: 'Default XKB layout',
)
option(
'default-variant',
type: 'string',
value: '',
description: 'Default XKB variant',
)
option(
'default-options',
type: 'string',
value: '',
description: 'Default XKB options',
)
option(
'enable-tools',
type: 'boolean',
value: true,
description: 'Enable building tools',
)
option(
'enable-x11',
type: 'boolean',
value: true,
description: 'Enable building the xkbcommon-x11 library',
)
option(
'enable-docs',
type: 'boolean',
value: true,
description: 'Enable building the documentation',
)
option(
'enable-cool-uris',
type: 'boolean',
value: false,
description: 'Enable creating redirections to maintain stable documentation pages',
)
option(
'enable-wayland',
type: 'boolean',
value: true,
description: 'Enable support for Wayland utility programs (requires enable-tools)',
)
option(
'enable-xkbregistry',
type: 'boolean',
value: true,
description: 'Enable building libxkbregistry',
)
option(
'enable-bash-completion',
type: 'boolean',
value: true,
description: 'Enable installing bash completion scripts',
)