[Bash-completion-commits] [SCM] bash-completion branch, master, updated. e24f69aac34fdfead77fb21fc7367f8776f2d5b2

Ville Skyttä ville.skytta at iki.fi
Sat Nov 28 10:51:18 UTC 2009


The following commit has been merged in the master branch:
commit ff0f741dcf6fefb3738dae606d544f57f29d7462
Author: Ville Skyttä <ville.skytta at iki.fi>
Date:   Sat Nov 28 11:57:57 2009 +0200

    Fix completion of remote scp filenames with spaces.
    
    Backslash escaping adds 3 backslashes, of which we want to remove 2,
    not 4 when unescaping.

diff --git a/CHANGES b/CHANGES
index 1b0328e..05a7848 100644
--- a/CHANGES
+++ b/CHANGES
@@ -24,7 +24,7 @@ bash-completion (2.x)
   * Apply pine completion to alpine too.
   * Remove many unnecessary short option completions where long ones exist.
   * Improve configure, cvs, gkrellm, lftp, mdadm, modprobe, mplayer,
-    mysqladmin, service, ssh, and general hostname completions.
+    mysqladmin, service, scp, ssh, and general hostname completions.
   * Add abook and wtf completion, based on work by Raphaël Droz.
   * Add k3b and lftpget completion.
   * Don't overwrite other host completions when completing from multiple
diff --git a/contrib/ssh b/contrib/ssh
index e45b0fa..8ab1fd1 100644
--- a/contrib/ssh
+++ b/contrib/ssh
@@ -177,7 +177,7 @@ _scp()
         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)

-- 
bash-completion



More information about the Bash-completion-commits mailing list