Subject: bug#23186: closed (Re: bug#23186: 25.0.92; Tramp: Windows does not always set COMSPEC, tramp blows up in a string-match)

From: Michael Albinus <[email-masked]>
Date: Sun, 03 Apr 2016 18:49:45 +0200

Eli Zaretskii <[email-masked]> writes:

Hi Eli,

> The beauty of w32-shell-name is that you don't need to worry about the
> switch: cmdproxy supports both -c and /c (and even -C and /C).  So you
> can now safely use just "-c" for tramp-encoding-command-switch.
>
> Or, if you want to be extra-cautious, and protect Tramp from people
> who point shell-file-name or $SHELL at something weird, you can use
> w32-shell-dos-semantics: if it returns non-nil, use /c, otherwise -c.

I check (boundp 'w32-shell-name). This looks safe. If somebody uses
weird settings, she will loose.

> Thanks.