Web lists-archives.com

[Mingw-msys] Re: Howto obtain a full Windows path from a shell command?




On Saturday 10 April 2010 11:26:51 Vincent Torri wrote:
> On Fri, 9 Apr 2010, David A. Cobb wrote:
> >  On one Windows machine, I have both Cygwin and MingW32+MSYS
> > installed.  To go with it, I have both Cygwin and Windows native
> > emacsen. On the native system, I find using MS cmd.exe as the
> > shell is sub-optimal. Would it be possible to set up MSYS as the
> > shell?
>
> in MSYS, the shell is actually bash.

Yes, it is, but in a standard MSYS installation we normally start it 
in `sh compatibility' mode.

> Iirc, there is no possible way to do what you want.

Maybe; maybe not.  Depending on how your native MSW emacs invokes a 
shell, it may be just a matter of making the COMSPEC variable, (in 
the environment), point to the MSYS shell; try starting emacs from 
the MSYS shell itself, with a command such as:--

  $ COMSPEC=/bin/sh.exe path/to/emacs ...

(This should work, if emacs uses a `system()' call, resolved through 
MSVCRT.DLL, as would be the case if built using MinGW, or any other 
compiler suite which uses this, or a derivative runtime).

> Use either the DOS console or the MSYS console (without rxvt)

Huh?  Certainly, avoid RXVT like the plague; use a native Win32 
console, either standalone, or driven through Console2.

> > This is part of a more-general question.  How can an application
> > tell whether it was launched by MSYS?  There are some tools I
> > want to make behave appropriately to the environment I'm working
> > in.
>
> get the value of the environment variable "TERM".

$TERM isn't really a good choice for identifying an MSYS environment, 
(it is too ubiquitous); something MSYS specific, such as $MSYSTEM, 
would surely be a better choice.

-- 
Regards,
Keith.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Mingw-msys mailing list
Mingw-msys@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/mingw-msys