mu: add bash completion

Automatically install (but configuration through meson options)
This commit is contained in:
Dirk-Jan C. Binnema
2026-08-07 08:14:39 +03:00
committed by Seth Ladygo
parent 756f795cea
commit f949862ed6
2 changed files with 24 additions and 1 deletions

View File

@ -78,6 +78,13 @@ option('guile-extension-dir',
#
# completion
#
option('bash-completion',
type : 'feature',
value: 'auto',
description: 'whether to install bash completion for mu')
option('bash-completion-dir',
type: 'string',
description: 'custom install path for bash completion')
option('zsh-completion',
type : 'feature',

View File

@ -14,9 +14,25 @@
## along with this program; if not, write to the Free Software Foundation,
## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
#
# bash
#
if get_option('bash-completion').allowed()
if get_option('bash-completion-dir') == ''
bcdir = datadir / 'bash-completion' / 'completions'
else
bcdir = get_option('bash-completion-dir')
endif
install_data('mu-completion.bash',
rename: 'mu',
install_dir: bcdir)
endif
#
# zsh
#
if get_option('zsh-completion').allowed()
if get_option('zsh-completion-dir') == ''
zcdir = datadir / 'zsh' / 'site-functions'
else