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

Ville Skyttä ville.skytta at iki.fi
Tue Sep 28 15:30:18 UTC 2010


The following commit has been merged in the master branch:
commit 66e35aa4a13aa4c4f63f1d9c8da7a4421359ec1b
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Tue Sep 28 18:29:26 2010 +0300

    Use awk sub instead of gsub where appropriate.

diff --git a/bash_completion b/bash_completion
index 98f35ca..9e16b9b 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1297,7 +1297,7 @@ _known_hosts_real()
             # FS needs to look for a comma separated list
             COMPREPLY=( "${COMPREPLY[@]}" $( awk 'BEGIN {FS=","}
             /^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \
-            gsub(" .*$", "", $i); \
+            sub(" .*$", "", $i); \
             sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \
             if ($i ~ /'"$awkcur"'/) {print $i} \
             }}' "${kh[@]}" 2>/dev/null ) )

-- 
bash-completion



More information about the Bash-completion-commits mailing list