Package: bash-completion
Version: 20080705
Severity: normal

If UserKnownHostFile or GlobalKnownHostsFile in ssh config file contains 
multiple subsequent spaces, e.g. 'spaced  hosts' (two spaces), _known_hosts 
fails.  Solution is to quote the sed output.  See attached diff.

Regards,
Freddy Vulto

-- System Information:
Debian Release: 4.0
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18-6-686
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
=== modified file 'bash_completion'
--- bash_completion     2008-11-01 11:32:22 +0000
+++ bash_completion     2008-11-05 21:43:50 +0000
@@ -2559,9 +2559,9 @@
 
        if [ [EMAIL PROTECTED] -gt 0 ]; then
            # expand path (if present) to global known hosts file
-           global_kh=$( eval echo $( sed -ne 's/^[ 
\t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t
 '"']*\(.*\)$/\1/p' "[EMAIL PROTECTED]" ) )
+           global_kh=$( eval echo "$( sed -ne 's/^[ 
\t]*[Gg][Ll][Oo][Bb][Aa][Ll][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t
 '"']*\(.*\)$/\1/p' "[EMAIL PROTECTED]" )" )
            # expand path (if present) to user known hosts file
-           user_kh=$( eval echo $( sed -ne 's/^[ 
\t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t
 '"']*\(.*\)$/\1/p' "[EMAIL PROTECTED]" ) )
+           user_kh=$( eval echo "$( sed -ne 's/^[ 
\t]*[Uu][Ss][Ee][Rr][Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['"$'\t
 '"']*\(.*\)$/\1/p' "[EMAIL PROTECTED]" )" )
        fi
 
        # Global known_hosts files
_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Reply via email to