Package: bash-completion
Version: 1:1.1-3
Severity: normal
Tags: patch
User: [email protected]
Usertags: origin-ubuntu karmic ubuntu-patch
Directory structure on target:
/home/martin/directory 1/directory 2/file.txt
Type:
scp target:/home/martin/directory<TAB><TAB>
Expected:
scp target:/home/martin/directory 1/directory 2/
Actual:
scp target:/home/martin/directory\\\ 1/
To summarise, it is impossible to do any further autocompletion once the
\\\ escape sequence has been given.
This is caused by the incorrect line:
# unescape spaces
path=${path//\\\\\\\\ / }
in contrib/ssh
It should, instead, read:
# unescape spaces
path=${path//\\\\}
This is fixed in bash-completion version control, but next release is
not scheduled for quite some time (AFAIK).
*** /tmp/tmpmIQ722
In Ubuntu, we've applied the attached patch to achieve the following:
* Fix scp overescaping (LP:482753)
We thought you might be interested in doing the same.
-- System Information:
Debian Release: squeeze/sid
APT prefers karmic-updates
APT policy: (500, 'karmic-updates'), (500, 'karmic-security'), (500,
'karmic')
Architecture: i386 (i686)
Kernel: Linux 2.6.31-14-generic (SMP w/2 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
diff -u bash-completion-1.1/debian/changelog
bash-completion-1.1/debian/changelog
diff -u bash-completion-1.1/debian/patches/series
bash-completion-1.1/debian/patches/series
--- bash-completion-1.1/debian/patches/series
+++ bash-completion-1.1/debian/patches/series
@@ -3,0 +4 @@
+bash-completion-scp-overescape-fix
only in patch2:
unchanged:
--- bash-completion-1.1.orig/contrib/ssh
+++ bash-completion-1.1/contrib/ssh
@@ -177,7 +177,7 @@
userhost=${cur%%?(\\):*}
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)