[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: shell-command parameters
From: |
Eli Zaretskii |
Subject: |
Re: shell-command parameters |
Date: |
Tue, 06 Jan 2009 22:40:15 +0200 |
> From: rustom <rustompmody@gmail.com>
> Date: Tue, 6 Jan 2009 07:02:14 -0800 (PST)
>
> On Jan 6, 7:29 pm, Kevin Rodgers <kevin.d.rodg...@gmail.com> wrote:
> > rustom wrote:
> > > But I still wonder what shell is running in windows emacs?
> >
> > ,----[ C-h v shell-file-name RET ]
> > | shell-file-name is a variable defined in `src/callproc.c'.
> > | Its value is "/bin/bash"
>
>
> Thanks. Thats the variable I was looking for.
> It turns out to be /path/to/emacs/bin/cmdproxy.exe
> Changing it to c:/cygwin/bin/bash.exe makes it work as expected (by a
> unix user)
>
> I wonder does emacs go out of its way to make life difficult for a
> windows user? MS does a good job of this without help from emacs :-)
> I mean 'cmd' has one expected behavior; shell has another. Why make
> the 'shell' variable point to a cmd imitation?
cmdproxy is not an imitation of CMD, it's a _proxy_ which eventually
invokes the real CMD.EXE. Thus its name.
As to the reasons why this is needed, here's the relevant commentary
from cmdproxy.c:
Accepts subset of Unix sh(1) command-line options, for compatibility
with elisp code written for Unix. When possible, executes external
programs directly (a common use of /bin/sh by Emacs), otherwise
invokes the user-specified command processor to handle built-in shell
commands, batch files and interactive mode.
The main function is simply to process the "-c string" option in the
way /bin/sh does, since the standard Windows command shells use the
convention that everything after "/c" (the Windows equivalent of
"-c") is the input string.
- shell-command parameters, rustom, 2009/01/05
- Re: shell-command parameters, Chetan, 2009/01/05
- Re: shell-command parameters, Peter Dyballa, 2009/01/05
- Re: shell-command parameters, Eli Zaretskii, 2009/01/05
- Message not available
- Re: shell-command parameters, Chetan, 2009/01/05
- Re: shell-command parameters, Eli Zaretskii, 2009/01/05
- Message not available
- Re: shell-command parameters, rustom, 2009/01/06
- Re: shell-command parameters, Kevin Rodgers, 2009/01/06
- Message not available
- Re: shell-command parameters, rustom, 2009/01/06
- Re: shell-command parameters, Andreas Politz, 2009/01/06
- Re: shell-command parameters,
Eli Zaretskii <=
- Re: shell-command parameters, Barry Margolin, 2009/01/08