From f949862ed6c4296160bcb11dee7a1be183b1ae74 Mon Sep 17 00:00:00 2001 From: "Dirk-Jan C. Binnema" Date: Fri, 7 Aug 2026 08:14:39 +0300 Subject: [PATCH] mu: add bash completion Automatically install (but configuration through meson options) --- meson.options | 7 +++++++ mu/completion/meson.build | 18 +++++++++++++++++- 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/meson.options b/meson.options index bc585ae8..da99fb8c 100644 --- a/meson.options +++ b/meson.options @@ -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', diff --git a/mu/completion/meson.build b/mu/completion/meson.build index f8c5c3e0..5a6a2ff8 100644 --- a/mu/completion/meson.build +++ b/mu/completion/meson.build @@ -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