Summary: | [patch] bash-completion known_hosts should remove [] and :port | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Xuefer <xuefer> |
Component: | Current packages | Assignee: | Gentoo Shell Tools project <shell-tools> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | ||
Priority: | High | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
patch for "base" that remove [] and :port
updated patch against bash completion 1.1 |
Description
Xuefer
2009-09-11 08:27:09 UTC
Created attachment 203767 [details, diff]
patch for "base" that remove [] and :port
This part of the code has changed substantially since 1.0 release in upstream trunk. Would you mind filing an upstream bug so it has a chance of getting included in the 1.1 release which is slated to be done in 2 weeks. http://bash-completion.alioth.debian.org/#bugs yeah, it changed a lot. but lines around my fix hasn't changed patch against latest trunk from git diff --git a/bash_completion b/bash_completion index 07fe78c..1b55a97 100644 --- a/bash_completion +++ b/bash_completion @@ -1172,6 +1172,8 @@ _known_hosts_real() COMPREPLY=( $( awk 'BEGIN {FS=","} /^\s*[^|\#]/ {for (i=1; i<=2; ++i) { \ gsub(" .*$", "", $i); \ + gsub("[\\[\\]]", "", $i); \ + gsub(":[0-9]+$", "", $i); \ if ($i ~ /'"$awkcur"'/) {print $i} \ }}' "${kh[@]}" 2>/dev/null ) ) fi i have registered a new account in their bug report system, verifying with email, got: """ Error Could Not Get User""" Created attachment 204280 [details]
updated patch against bash completion 1.1
gentoo "/etc/bash-completion.d/base" is actually /etc/bash-completion from upstream package
Thanks, I still wonder under what conditions you get [foo] in your known_hosts file. (In reply to comment #5) > Thanks, I still wonder under what conditions you get [foo] in your known_hosts > file. > Ah, found it. the brackets are needed for ipv6.. Your patch is applied. I'm going to close this bug because since 1.0 was released you are the first person to report it and you already fixed it locally :) I'm anxious for 1.1 so you can expect to see that almost immediately after release. 16:07 < CIA-2> d.paleino * rf061b21 bash-completion/ (CHANGES bash_completion): Clean [1.2.3.4]:port format in known_hosts, thanks to Xuefer (Gentoo: #284563) |