[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Is quotes in tramp-find-inline-compress needed in MS-Windows?
From: |
Michael Albinus |
Subject: |
Re: Is quotes in tramp-find-inline-compress needed in MS-Windows? |
Date: |
Thu, 01 Feb 2018 19:57:40 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (gnu/linux) |
Chris Zheng <address@hidden> writes:
> Hi all,
Hi Chris,
> The function `tramp-find-inline-compress' in tramp-sh.el has the code:
>
> (format
> ;; Windows shells need the program file name after
> ;; the pipe symbol be quoted if they use forward
> ;; slashes as directory separators.
> (if (memq system-type '(windows-nt))
> "echo %s | \"%s\" | \"%s\""
> "echo %s | %s | %s")
> magic compress decompress)
>
> which says the commands need to be quoted in MS-Windows. But In
> MS-Windows 8.1 I get
>
> M-& echo xyzzy | gzip | gzip -d RET
> ⇒ Success.
>
> M-& echo xyzzy | \"gzip\" | \"gzip -d\" RET
> ⇒ Error.
The backslashes in the code snippet above are needed to mask the
quotation mark in the string. They do not arrive the target shell. Try
M-& echo xyzzy | "gzip" | "gzip -d" RET
> Thank you,
>
> Chris
Best regards, Michael.