summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-02-05 12:27:35 +0200
committerVille Skyttä <ville.skytta@iki.fi>2011-02-05 12:27:35 +0200
commit81794a9dcf71b408b1a1a4cc7b1888725921291e (patch)
tree2505363f4a6dec1bbd170cdfa80af7ff3fd75b78
parent80312be9afd77307dd8eecf4bc1a2408949ed58e (diff)
downloadbash-completion-81794a9dcf71b408b1a1a4cc7b1888725921291e.tar.gz
(testsuite) Avoid duplicates in get_hosts() return value.
-rw-r--r--test/lib/library.exp2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/lib/library.exp b/test/lib/library.exp
index 61b3f409..491da212 100644
--- a/test/lib/library.exp
+++ b/test/lib/library.exp
@@ -636,7 +636,7 @@ proc get_known_hosts {{cword ''}} {
# @return list Hostnames
# @see get_known_hosts()
proc get_hosts {} {
- set hosts [exec bash -c "compgen -A hostname"]
+ set hosts [exec bash -c "compgen -A hostname | sort -u"]
# NOTE: Circumventing var `avahi_hosts' and appending directly to `hosts'
# causes an empty element to be inserted in `hosts'.
# -- FVu, Fri Jul 17 23:11:46 CEST 2009