bash-completion/bash-completion-1.2-known_hosts-ipv6-630658.patch
Ville Skyttä c506b646c8 - Apply upstream ~username completion fix for #628130.
- Apply upstream rpm completion improvements for #630328.
- Apply upstream IPv6 address completion fix for #630658.
- Drop some completions that are included in respective upstream packages.
- Fix qdbus/dcop uninstall trigger.
2010-10-04 00:41:17 +03:00

15 lines
573 B
Diff

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