diff options
author | John Hood <cgull@glup.org> | 2015-06-23 23:40:40 -0400 |
---|---|---|
committer | John Hood <cgull@glup.org> | 2015-06-25 01:02:17 -0400 |
commit | dee1a2eecc9a2355d1818205292e403143fc0554 (patch) | |
tree | e933d04ecff9a23c683939adf91d6222afc4e9cd /conf | |
parent | 6a169dc7eaf8c3e1b959ce900bf0b3bcd6a8a116 (diff) |
Improve Debian bash-completion support
* Autoconf queries pkgconf for bash-completion dir-- resolves
lintian's `package-install-into-obsolete-dir` diagnostic
* Use improved completion snippet from
<https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782169>
* Remove old /etc/bash_completion.d/mosh "conffile" with
dh-maintscript + dpkg-maintscript-helper
Closes #628.
Signed-off-by: John Hood <cgull@glup.org>
Diffstat (limited to 'conf')
-rw-r--r-- | conf/Makefile.am | 4 | ||||
-rw-r--r-- | conf/bash-completion/completions/mosh | 9 | ||||
-rw-r--r-- | conf/bash_completion.d/mosh | 1 |
3 files changed, 12 insertions, 2 deletions
diff --git a/conf/Makefile.am b/conf/Makefile.am index cb45ecd..767f21a 100644 --- a/conf/Makefile.am +++ b/conf/Makefile.am @@ -1,3 +1,5 @@ +completionsdir = @completions@ +dist_completions_DATA = nobase_dist_sysconf_DATA = if INSTALL_UFW @@ -5,5 +7,5 @@ if INSTALL_UFW endif if INSTALL_COMPLETION - nobase_dist_sysconf_DATA += bash_completion.d/mosh + dist_completions_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 |