Is quotes in tramp-find-inline-compress needed in MS-Windows?
Hi all, 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. This makes me think is the quotes needed? Thank you, Chris ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel
Re: Is quotes in tramp-find-inline-compress needed in MS-Windows?
Chris Zheng 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. ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel
Re: Is quotes in tramp-find-inline-compress needed in MS-Windows?
On Fri, 02 Feb 2018 10:57:40 +0800, Michael Albinus wrote: Hello Michael, > Chris Zheng writes: > > > Hi Chris, > > > 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 I thought about this command, and the results are M-& echo xyzzy | "gzip" | "gzip -d" RET ⇒ Not a command error for "gzip -d". M-& echo xyzzy | "gzip" | "gzip" -d RET ⇒ Success. So the best approach is to quote only the program name. Thank you for the reply and the clarification of backslashes. Best wishes, Chris > Best regards, Michael. ___ Tramp-devel mailing list Tramp-devel@gnu.org https://lists.gnu.org/mailman/listinfo/tramp-devel