From 05da49fc3f8f5b9bf935a40fde6dc798413d2e1e Mon Sep 17 00:00:00 2001 From: John Hood Date: Thu, 11 Jun 2015 01:26:02 -0400 Subject: [PATCH] Update bash completion for Debian. This improves the completion, as suggested in , and moves the completion from `/etc/bash_completion.d/mosh` to `/usr/share/bash-completion/completions/mosh` as recommended by lintian in its `package-install-into-obsolete-dir` check. Closes #628. Signed-off-by: John Hood --- conf/Makefile.am | 3 ++- conf/bash-completion/completions/mosh | 9 +++++++++ conf/bash_completion.d/mosh | 1 - debian/package.bash-completion | 1 + 4 files changed, 12 insertions(+), 2 deletions(-) create mode 100644 conf/bash-completion/completions/mosh delete mode 100644 conf/bash_completion.d/mosh create mode 100644 debian/package.bash-completion diff --git a/conf/Makefile.am b/conf/Makefile.am index cb45ecd..70c5915 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -1,9 +1,10 @@ nobase_dist_sysconf_DATA = +nobase_dist_data_DATA = if INSTALL_UFW nobase_dist_sysconf_DATA += ufw/applications.d/mosh endif if INSTALL_COMPLETION - nobase_dist_sysconf_DATA += bash_completion.d/mosh + nobase_dist_data_DATA += bash-completion/completions/mosh endif diff --git a/conf/bash-completion/completions/mosh b/conf/bash-completion/completions/mosh new file mode 100644 index 0000000..e928112 --- /dev/null +++ b/conf/bash-completion/completions/mosh @@ -0,0 +1,9 @@ +_mosh () { + local cur prev + + _init_completion || return + + _known_hosts_real -a "$cur" +} + +complete -F _mosh mosh diff --git a/conf/bash_completion.d/mosh b/conf/bash_completion.d/mosh deleted file mode 100644 index 93768d3..0000000 --- a/conf/bash_completion.d/mosh +++ /dev/null @@ -1 +0,0 @@ -complete -F _known_hosts mosh diff --git a/debian/package.bash-completion b/debian/package.bash-completion new file mode 100644 index 0000000..19d2e06 --- /dev/null +++ b/debian/package.bash-completion @@ -0,0 +1 @@ +conf/bash_completion.d/mosh