summaryrefslogtreecommitdiff
path: root/bash_completion
diff options
context:
space:
mode:
authorVille Skyttä <ville.skytta@iki.fi>2011-11-05 00:53:39 +0200
committerVille Skyttä <ville.skytta@iki.fi>2011-11-05 00:53:39 +0200
commit333a5a50bebcbea3f0655351b2f7c57ea195c04a (patch)
tree618f467d1f8f952ebd9d4ccdc251e9a12790a886 /bash_completion
parentb54d3f022f73553bdec64e1da29736d41835a029 (diff)
downloadbash-completion-333a5a50bebcbea3f0655351b2f7c57ea195c04a.tar.gz
_known_hosts_real: Handle more than two hostnames per known hosts line (Debian: #647352).
Diffstat (limited to 'bash_completion')
-rw-r--r--bash_completion2
1 files changed, 1 insertions, 1 deletions
diff --git a/bash_completion b/bash_completion
index 8c8fab59..3bfbf724 100644
--- a/bash_completion
+++ b/bash_completion
@@ -1417,7 +1417,7 @@ _known_hosts_real()
/^\s*[^|\#]/ {
sub("^@[^ ]+ +", ""); \
sub(" .*$", ""); \
- for (i=1; i<=2; ++i) { \
+ for (i=1; i<=NF; ++i) { \
sub("^\\[", "", $i); sub("\\](:[0-9]+)?$", "", $i); \
if ($i ~ /'"$awkcur"'/) {print $i} \
}}' "${kh[@]}" 2>/dev/null ) )