[Bash-completion-commits] [SCM] bash-completion branch, master, updated. 6301ee273b994d250e5caaa4f2e7fec88b4a1193
Ville Skyttä
ville.skytta at iki.fi
Mon Apr 26 18:59:59 UTC 2010
The following commit has been merged in the master branch:
commit 6301ee273b994d250e5caaa4f2e7fec88b4a1193
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Mon Apr 26 21:58:14 2010 +0300
Fix finger test failure when _known_hosts_real returns duplicates.
diff --git a/test/lib/completions/finger.exp b/test/lib/completions/finger.exp
index 31ce04f..30f2b08 100644
--- a/test/lib/completions/finger.exp
+++ b/test/lib/completions/finger.exp
@@ -41,8 +41,8 @@ foreach h [get_known_hosts] {
set first [string range $h 0 0]
if {$char == "" && [string first $first $COMP_WORDBREAKS] == -1} {set char $first}
if {$char != ""} {
- # Only append hostname if starting with $char
- if {$first == $char} {
+ # Only append unique hostnames starting with $char
+ if {$first == $char && [lsearch -exact $hosts "test@$h"] == -1} {
# Prefix hosts with username 'test@'
lappend hosts "test@$h"
}; # if
--
bash-completion
More information about the Bash-completion-commits
mailing list