- More IPv6 address completion fixes, #630658.

This commit is contained in:
Ville Skyttä 2010-10-05 09:34:22 +03:00
parent c506b646c8
commit 1841a586f6
2 changed files with 30 additions and 4 deletions

View File

@ -1,8 +1,31 @@
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()
@@ -1259,16 +1259,16 @@ _known_hosts_real()
awkcur=${awkcur//\./\\\.}
curd=$awkcur
- if [[ "$awkcur" == [0-9]*.* ]]; then
- # Digits followed by a dot - just search for that
- awkcur="^$awkcur.*"
+ if [[ "$awkcur" == [0-9]*[.:]* ]]; then
+ # Digits followed by a dot or a colon - just search for that
+ awkcur="^$awkcur[.:]*"
elif [[ "$awkcur" == [0-9]* ]]; then
- # Digits followed by no dot - search for digits followed
- # by a dot
- awkcur="^$awkcur.*\."
+ # Digits followed by no dot or colon - search for digits followed
+ # by a dot or a colon
+ awkcur="^$awkcur.*[.:]"
elif [ -z "$awkcur" ]; then
- # A blank - search for a dot or an alpha character
- awkcur="[a-z.]"
+ # A blank - search for a dot, a colon, or an alpha character
+ awkcur="[a-z.:]"
else
awkcur="^$awkcur"
fi
@@ -1278,8 +1278,7 @@ _known_hosts_real()
COMPREPLY=( "${COMPREPLY[@]}" $( awk 'BEGIN {FS=","}
/^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \
gsub(" .*$", "", $i); \

View File

@ -3,7 +3,7 @@
Name: bash-completion
Version: 1.2
Release: 3%{?dist}
Release: 4%{?dist}
Epoch: 1
Summary: Programmable completion for Bash
@ -363,6 +363,9 @@ fi
%changelog
* Tue Oct 5 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-4
- More IPv6 address completion fixes, #630658.
* Tue Sep 28 2010 Ville Skyttä <ville.skytta@iki.fi> - 1:1.2-3
- Apply upstream ~username completion fix for #628130.
- Apply upstream rpm completion improvements for #630328.