[Bash-completion-devel] [bash-completion-Bugs][312695] Completion about IPv6 address does not work properly
bash-completion-bugs at alioth.debian.org
bash-completion-bugs at alioth.debian.org
Tue Sep 28 15:32:39 UTC 2010
Bugs item #312695, was changed at 2010-09-06 04:33 by Ville Skyttä
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312695&group_id=100114
>Status: Closed
Priority: 3
Submitted By: Nobody (None)
>Assigned to: Ville Skyttä (scop-guest)
Summary: Completion about IPv6 address does not work properly
>Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
>Status: Fix Committed
Original bug number:
Initial Comment:
Anonymous message posted by kuniga at users.sourceforge.net
I used bash-completion and ssh on IPv6 environment, then I
expected a completion as follows.
$ ssh fd00:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:5555
But actually I got a completion as follows.
$ ssh fd00:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx
When last 16 bits of IPv6 address contains only digits, this
problem occurs.
I tried to make a patch of this problem.
--- /etc/bash_completion.orig 2010-06-17 00:44:20.000000000 +0900
+++ /etc/bash_completion 2010-09-06 09:37:17.485440380 +0900
@@ -1279,7 +1279,7 @@
/^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \
gsub(" .*$", "", $i); \
gsub("[\\[\\]]", "", $i); \
- gsub(":[0-9]+$", "", $i); \
+ if ($i ~ /[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+:[0-9]+/) {gsub(":[0-9]+$", "", $i)}; \
if ($i ~ /'"$awkcur"'/) {print $i} \
}}' "${kh[@]}" 2>/dev/null ) )
fi
----------------------------------------------------------------------
>Comment By: Ville Skyttä (scop-guest)
Date: 2010-09-28 18:32
Message:
Thanks for the report and the patch. However the patch would AFAIK break [host]:port completions where "host" is a hostname, not an IPv4 address.
Alternative fix in git:
http://git.debian.org/?p=bash-completion/bash-completion.git;a=commitdiff;h=9341a1131cc9ed9e29d1e118819adb3d8dcf54a6
----------------------------------------------------------------------
You can respond by visiting:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312695&group_id=100114
More information about the Bash-completion-devel
mailing list