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