Hi,

See this change in "ls" behaviour:

http://git.savannah.gnu.org/gitweb/?p=coreutils.git;a=commit;h=109b9220cead6e979d22d16327c4d9f8350431cc

Users are already confused:
http://unix.stackexchange.com/questions/258679/why-is-ls-suddenly-wrapping-items-with-spaces-in-single-quotes

this Version of coreutils is already used in Arch Linux. Today I was also
hit by this bug when connecting to a Cygwin system using ssh and dired
output was quoted:

-rw-r--r-- 1 juergen juergen       0  9. Jul 09:55 'escape me'

There is also a bug report in Debian Testing:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=813164

@Michael: Are there any objections against applying my proposed patch?

Regards,

Jürgen
From 264f8ed82f6b12a7acfd0bf9b131c91e3b5c277b Mon Sep 17 00:00:00 2001
From: Juergen Hoetzel <[email protected]>
Date: Sat, 9 Jul 2016 19:37:00 +0200
Subject: [PATCH] * tramp-sh.el (tramp-sh-handle-insert-directory): Add switch
 "--quoting-style=literal" if remote host supports quoting style. Recent
 versions of coreutils changed default quoting style to
 "--quoting=shell-escape".

---
 lisp/ChangeLog   | 7 +++++++
 lisp/tramp-sh.el | 2 ++
 2 files changed, 9 insertions(+)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 9418695..0ad2c19 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,10 @@
+2016-07-09  Jürgen Hötzel  <[email protected]>
+
+	* tramp-sh.el (tramp-sh-handle-insert-directory): Add switch
+	"--quoting-style=literal" if remote host supports quoting style.
+	Recent versions of coreutils changed default quoting style to
+	"--quoting=shell-escape".
+
 2016-07-07  Michael Albinus  <[email protected]>
 
 	* tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band):
diff --git a/lisp/tramp-sh.el b/lisp/tramp-sh.el
index 24a1739..dcdffb4 100644
--- a/lisp/tramp-sh.el
+++ b/lisp/tramp-sh.el
@@ -2657,6 +2657,8 @@ The method used must be an out-of-band method."
 	 filename switches wildcard full-directory-p)
       (when (stringp switches)
         (setq switches (split-string switches)))
+      (when (tramp-get-ls-command-with-quoting-style v)
+	(setq switches (append switches '("--quoting-style=literal"))))
       (when (and (member "--dired" switches)
 		 (not (tramp-get-ls-command-with-dired v)))
 	(setq switches (delete "--dired" switches)))
-- 
2.8.3

_______________________________________________
Tramp-devel mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/tramp-devel

Reply via email to