summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2012-11-06 21:55:57 +0200
committerVille Skyttä <ville.skytta@iki.fi>2012-11-06 21:55:57 +0200
commitf917b750dda9dc977579c264840878a97ed0fdfe (patch)
treec791d9204cb788f49f7a7fb389f0caec895d4588
parent3b93c22a5bb9e47301fca89ec677a9805ea71518 (diff)
downloadbash-completion-f917b750dda9dc977579c264840878a97ed0fdfe.tar.gz
_known_hosts_real: Filter ruptime stdout error spewage (Alioth: #313893).
-rw-r--r--bash_completion3
1 files changed, 2 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 9559339e..870811b4 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1547,7 +1547,8 @@ _known_hosts_real()
# Add hosts reported by ruptime.
COMPREPLY+=( $( compgen -W \
- "$( ruptime 2>/dev/null | awk '{ print $1 }' )" -- "$cur" ) )
+ "$( ruptime 2>/dev/null | awk '!/^ruptime:/ { print $1 }' )" \
+ -- "$cur" ) )
# Add results of normal hostname completion, unless
# `COMP_KNOWN_HOSTS_WITH_HOSTFILE' is set to an empty value.