[Bash-completion-devel] [bash-completion-Bugs][314533] SSH Completion Failed

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Fri Jul 18 06:33:21 UTC 2014


bash-completion-Bugs item #314533 was changed at 2014-07-18 14:33 by Neville Gao
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314533&group_id=100114

Status: Open
Priority: 3
Submitted By: Neville Gao (figod-guest)
Assigned to: Nobody (None)
Summary: SSH Completion Failed 
Distribution: Debian
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
Following message[1] appears when I type 'ssh <TAB>' every time. I attached my .ssh/config and proposal patch.

[1] sed: -e expression #1, char 97: invalid reference \2 on `s' command's RHS

----------------------------------------------------------------------

Comment By: Neville Gao (figod-guest)
Date: 2014-07-18 14:33

Message:
I tested on a fresh Debian7, can you please try this?

----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2014-07-12 20:38

Message:
I'm using sed 4.2.2 as well (on Fedora 20), and running the same command on shell produces no output. It doesn't do anything either because ${config[@]} is empty, but replacing it with ~/.ssh/config produces the expected output and no errors. Even adding --posix to sed options doesn't cause any problems here.

----------------------------------------------------------------------

Comment By: Neville Gao (figod-guest)
Date: 2014-06-25 13:38

Message:
I'm using sed 4.2.2

I ran the following single command from bash:
sed -ne 's/^[ \t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['"$'\t '"']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p' "${config[@]}"

It said the errors.

----------------------------------------------------------------------

Comment By: Ville Skyttä  (scop-guest)
Date: 2013-12-07 06:05

Message:
I cannot reproduce, I get no errors when I complete with your config, so more details are needed.

Looking at the patch, I'm confused; are you sure you got it the right way? Turning \{0,1\} into ? and \{1,\} into + is introducing a sed portability issue, and removing the backslash from front of ( and ) actually *introduces* the "invalid reference \2" errors you're seeing as the unescaped parenthesis are no longer capturing groups...?

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=314533&group_id=100114



More information about the Bash-completion-devel mailing list