aboutsummaryrefslogtreecommitdiffhomepage
path: root/conf
diff options
context:
space:
mode:
authorGravatar John Hood <cgull@glup.org>2015-06-11 01:26:02 -0400
committerGravatar John Hood <cgull@glup.org>2015-06-21 16:27:06 -0400
commit05da49fc3f8f5b9bf935a40fde6dc798413d2e1e (patch)
tree986a60c18ffd2ae173d08616ab73471aa8e1347f /conf
parenta0996386036065fa821b41aab2084569646973b2 (diff)
Update bash completion for Debian.
This improves the completion, as suggested in <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=782169>;, 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 <cgull@glup.org>
Diffstat (limited to 'conf')
-rw-r--r--conf/Makefile.am3
-rw-r--r--conf/bash-completion/completions/mosh9
-rw-r--r--conf/bash_completion.d/mosh1
3 files changed, 11 insertions, 2 deletions
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