[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 81794a9dcf71b408b1a1a4cc7b1888725921291e

Ville Skyttä ville.skytta at iki.fi
Sat Feb 5 10:27:41 UTC 2011


The following commit has been merged in the master branch:
commit 81794a9dcf71b408b1a1a4cc7b1888725921291e
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Feb 5 12:27:35 2011 +0200

    (testsuite) Avoid duplicates in get_hosts() return value.

diff --git a/test/lib/library.exp b/test/lib/library.exp
index 61b3f40..491da21 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

-- 
bash-completion



More information about the Bash-completion-commits mailing list