diff -u bash-completion-1.0/debian/changelog bash-completion-1.0/debian/changelog --- bash-completion-1.0/debian/changelog +++ bash-completion-1.0/debian/changelog @@ -1,3 +1,11 @@ +bash-completion (1:1.0-3ubuntu3) lucid; urgency=low + + * Fix regressions in SCP completion + - No completion at all after : (LP: #449349) + - Completion doesn't correctly handle spaces (LP: #482753) + + -- Martin Eve (www.martineve.com) Sat, 14 Nov 2009 19:15:50 +0000 + bash-completion (1:1.0-3ubuntu2) karmic; urgency=low * Backport quote_readline fix for bash 4, since double-quoting for compgen diff -u bash-completion-1.0/debian/patches/series bash-completion-1.0/debian/patches/series --- bash-completion-1.0/debian/patches/series +++ bash-completion-1.0/debian/patches/series @@ -6,0 +7 @@ +fix_scp_regressions.patch only in patch2: unchanged: --- bash-completion-1.0.orig/debian/patches/fix_scp_regressions.patch +++ bash-completion-1.0/debian/patches/fix_scp_regressions.patch @@ -0,0 +1,28 @@ +Index: bash-completion-1.0/contrib/ssh +=================================================================== +--- bash-completion-1.0.orig/contrib/ssh 2009-11-14 19:26:10.000000000 +0000 ++++ bash-completion-1.0/contrib/ssh 2009-11-14 19:30:51.000000000 +0000 +@@ -62,18 +62,18 @@ + local optconfigfile + + COMPREPLY=() +- cur=`_get_cword ":"` + +- _expand || return 0 ++ cur="${COMP_WORDS[COMP_CWORD]}" ++ prev="${COMP_WORDS[COMP_CWORD-1]}" + +- if [[ "$cur" == *:* ]]; then ++ if [[ "$prev" == *:* ]]; then + local IFS=$'\t\n' + # remove backslash escape from : + cur=${cur/\\:/:} +- userhost=${cur%%?(\\):*} ++ userhost=${COMP_WORDS[COMP_CWORD-2]} + path=${cur#*:} + # unescape spaces +- path=${path//\\\\\\\\ / } ++ path=${path//\\\\} + if [ -z "$path" ]; then + # default to home dir of specified user on remote host + path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null)