summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-12-03 20:01:11 +0200
committerVille Skyttä <ville.skytta@iki.fi>2011-12-03 20:01:11 +0200
commit5b455e01715cdcd34a17f4b4cde587efccfb9eb9 (patch)
tree7c49a404468c9ea78836c730a8adbc4a9e349b86
parent86d0395fc5efbeef9aad8cc27e84270f7c59faa1 (diff)
downloadbash-completion-5b455e01715cdcd34a17f4b4cde587efccfb9eb9.tar.gz
_known_hosts_real: Include hosts reported by ruptime (Alioth: #313308).
-rw-r--r--bash_completion4
1 files changed, 4 insertions, 0 deletions
diff --git a/bash_completion b/bash_completion
index eaee91e0..5e200afe 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1526,6 +1526,10 @@ _known_hosts_real()
awk -F';' '/^=/ { print $7 }' | sort -u )" -- "$cur" ) )
fi
+ # Add hosts reported by ruptime.
+ COMPREPLY+=( $( compgen -W \
+ "$( ruptime 2>/dev/null | awk '{ print $1 }' )" -- "$cur" ) )
+
# Add results of normal hostname completion, unless
# `COMP_KNOWN_HOSTS_WITH_HOSTFILE' is set to an empty value.
if [[ -n ${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1} ]]; then