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

David Paleino d.paleino at gmail.com
Thu Sep 17 21:06:54 UTC 2009


The following commit has been merged in the master branch:
commit f061b21ef937db727928392fd166ee7339f8a8ac
Author: David Paleino <d.paleino at gmail.com>
Date:   Thu Sep 17 23:05:52 2009 +0200

    Clean [1.2.3.4]:port format in known_hosts, thanks to Xuefer (Gentoo: #284563)

diff --git a/CHANGES b/CHANGES
index 9506916..0aa57db 100644
--- a/CHANGES
+++ b/CHANGES
@@ -36,6 +36,8 @@ bash-completion (1.x)
   * Improve qemu completion (Debian: #534901)
   * Added sshfs completion (shares the same as scp) (Debian: #545978)
   * Fixed obvious brokenness (typos) in contrib/mdadm
+  * Clean [1.2.3.4]:port format in known_hosts, thanks to
+    Xuefer (Gentoo: #284563)
   * Patches from PLD Linux (thanks to Elan Ruusamäe):
     - avoid sed pipe as ps itself can omit the headers
     - improve service(8) completion, also look for "msg_usage"
diff --git a/bash_completion b/bash_completion
index 0e5bca7..9623ffa 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1172,6 +1172,8 @@ _known_hosts_real()
 			COMPREPLY=( $( awk 'BEGIN {FS=","}
 				/^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \
 				       gsub(" .*$", "", $i); \
+				       gsub("[\\[\\]]", "", $i); \
+				       gsub(":[0-9]+$", "", $i); \
 				       if ($i ~ /'"$awkcur"'/) {print $i} \
 				}}' "${kh[@]}" 2>/dev/null ) )
 		fi

-- 
bash-completion



More information about the Bash-completion-commits mailing list