all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Koichi Arakawa <arakawa@pp.iij4u.or.jp>
To: 37228@debbugs.gnu.org
Subject: bug#37228: [PATCH] tramp: dired for files which name contains spaces
Date: Fri, 30 Aug 2019 14:28:04 +0900 (=?UTF-8?Q?=E6=9D=B1=E4=BA=AC?= (=?UTF-8?Q?=E6=A8=99=E6=BA=96=E6=99=82?=))	[thread overview]
Message-ID: <20190830.142804.807928545647417240.arakawa@pp.iij4u.or.jp> (raw)

Hi,

It seems for me that the current version of tramp does not handle
dired properly for files which name contains spaces.

How about using the '-0' option of xargs?

Regards,
Koichi Arakawa

--- tramp-sh.el.~1~	2019-08-28 07:24:07.781000000 +0900
+++ tramp-sh.el	2019-08-30 13:59:34.747676700 +0900
@@ -1762,8 +1762,8 @@
        ;; Apostrophes in the stat output are masked as
        ;; `tramp-stat-marker', in order to make a proper shell escape
        ;; of them in file names.
-       "cd %s && echo \"(\"; (%s %s -a | "
-       "xargs %s -c "
+       "cd %s && echo \"(\"; (%s %s -a | tr '\\n' '\\0' | "
+       "xargs -0 %s -c "
        "'(%s%%n%s (%s%%N%s) %%h %s %s %%X %%Y %%Z %%s %s%%A%s t %%i -1)' "
        "-- 2>/dev/null | sed -e 's/\"/\\\\\"/g' -e 's/%s/\"/g'); echo \")\""))
     (tramp-shell-quote-argument localname)







             reply	other threads:[~2019-08-30  5:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-30  5:28 Koichi Arakawa [this message]
     [not found] ` <87tv9y50ad.fsf@gmx.de>
2019-09-01 22:02   ` bug#37228: [PATCH] tramp: dired for files which name contains spaces Koichi Arakawa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190830.142804.807928545647417240.arakawa@pp.iij4u.or.jp \
    --to=arakawa@pp.iij4u.or.jp \
    --cc=37228@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.