Re: how to get the windows PATH env in cygwin

2009-12-03 Thread kiorky
mak...@apem3 ~
$ echo $PATH
/cygdrive/e/minitage2/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/e/Subversion/bin:/cygdrive/e/OpenLDAP/CD
SSilver/:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/system32
/WindowsPowerShell/v1.0:/cygdrive/e/Program Files/TortoiseSVN/bin

Do you see any duplicates ...

Lee Maschmeyer a écrit :
 ran cmd.exe from start menu
 
 And that gets the info into Cygwin - how?
 
 

-- 
Cordialement,
KiOrKY
GPG Key FingerPrint: 0x1A1194B7681112AF



signature.asc
Description: OpenPGP digital signature


Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Reinier Post
On Mon, Nov 30, 2009 at 07:40:51PM -0600, Jeremy Bopp wrote:

[...]

 If you want to see the Windows PATH setting unmolested by Cygwin, you
 will either need to strip out the additions set by /etc/profile or avoid
 running under an environment modified by /etc/profile.

It doesn't add, actually - it replaces it.

A few weeks ago I got fed up with Cygwin not being able to find my
Windows executables and wrote a script to add all directories with
*.exe files to the $PATH.  (It runs overnight with cron.)
This leads to a strange effect: the resulting $PATH is so long (over 2800
chars) that, although it successfully locates many Windows executables,
attempts to run them fail with an error message:

% dot -h
/cygdrive/c/Program Files/Graphviz/bin/dot: Message too long.

Workaround:

% env - `which dot` -h

Other than that it works well.  (This is Cygwin 1.5.)

-- 
Reinier Post
TU Eindhoven

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Andy Koppe
2009/12/1 Reinier Post:
 If you want to see the Windows PATH setting unmolested by Cygwin, you
 will either need to strip out the additions set by /etc/profile or avoid
 running under an environment modified by /etc/profile.

 It doesn't add, actually - it replaces it.

You're wrong. The Cygwin DLL at startup translates the Windows PATH
variable. And this line in /etc/profile adds to it:

PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH


 A few weeks ago I got fed up with Cygwin not being able to find my
 Windows executables

It's not Cygwin's fault that Windows executables are sprinkled all
over the filesystem. Cmd.exe also only finds stuff that's in the PATH.


 and wrote a script to add all directories with
 *.exe files to the $PATH.

I bet that does wonders for performance.

Andy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread DePriest, Jason R.
On Tue, Dec 1, 2009 at 10:03 AM, Andy Koppe  wrote:
 2009/12/1 Reinier Post:
 If you want to see the Windows PATH setting unmolested by Cygwin, you
 will either need to strip out the additions set by /etc/profile or avoid
 running under an environment modified by /etc/profile.

 It doesn't add, actually - it replaces it.

 You're wrong. The Cygwin DLL at startup translates the Windows PATH
 variable. And this line in /etc/profile adds to it:

 PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH



This is completely and totally true.

To verify it, all you have to do is open a bash prompt (Cygwin.bat,
mintty, rxvt, whatever) and then launch a cmd.exe or powershell.

Check the path in the bash prompt and you will see the cygwin stuff at
the beginning of it.

Check the path in the cmd.exe or powershell prompt which was run
*after* the bash script updated the path and you will see that it does
*not* include the cygwin paths.

It doesn't override what you have set anywhere but in cygwin's magic space.

-Jason

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Jeremy Bopp
DePriest, Jason R. wrote:
 On Tue, Dec 1, 2009 at 10:03 AM, Andy Koppe  wrote:
 2009/12/1 Reinier Post:
 If you want to see the Windows PATH setting unmolested by Cygwin, you
 will either need to strip out the additions set by /etc/profile or avoid
 running under an environment modified by /etc/profile.
 It doesn't add, actually - it replaces it.
 You're wrong. The Cygwin DLL at startup translates the Windows PATH
 variable. And this line in /etc/profile adds to it:

 PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH


 
 This is completely and totally true.

I'm sorry, but it is not true.  Maybe there is a misunderstanding though.

 To verify it, all you have to do is open a bash prompt (Cygwin.bat,
 mintty, rxvt, whatever) and then launch a cmd.exe or powershell.
 
 Check the path in the bash prompt and you will see the cygwin stuff at
 the beginning of it.

Yes, indeed you will see the Cygwin paths prepended to PATH as you say.
 Andy said this as well and even included the line from /etc/profile
which does this work when you run a login shell (i.e. bash --login under
rxvt or what-have-you).  However, since the remainder of PATH derives
from the Windows-native value of PATH (converted automatically by Cygwin
to POSIX-style), we're saying that the value of PATH was *modified*
rather than *replaced* entirely.  To say that PATH was entirely replaced
is to imply that the new value of PATH has no basis whatsoever in the
original value of PATH.

 Check the path in the cmd.exe or powershell prompt which was run
 *after* the bash script updated the path and you will see that it does
 *not* include the cygwin paths.
 
 It doesn't override what you have set anywhere but in cygwin's magic space.

No one is arguing that Cygwin ever modifies PATH system-wide or for
anything aside from Cygwin programs.  In the base case, a Cygwin program
will see the value of PATH converted to POSIX-style.  If that same
Cygwin program is run from a login shell, it will see the PATH as
further modified by /etc/profile as Andy indicated.

Windows programs will only ever see a Windows-style PATH no matter what;
however, they WILL see the Cygwin paths converted to Windows-style and
prepended IF they were run from a login shell under Cygwin.

-Jeremy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Lee Maschmeyer

To verify it, all you have to do is open a bash prompt (Cygwin.bat,
mintty, rxvt, whatever) and then launch a cmd.exe or powershell.

Check the path in the bash prompt and you will see the cygwin stuff at
the beginning of it.

Check the path in the cmd.exe or powershell prompt which was run
*after* the bash script updated the path and you will see that it does
*not* include the cygwin paths.


Well, I just (gasp) tested! And awful lot of bandwidth wasting is being done 
by people who think they know how it works. But for me, at least, the path 
from the invocation of cmd was the same as the path in the Cygwin session 
from which it was invoked. Thus:


0/tty2W0(2)$ echo $PATH
/home/lmaschm/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Program 
Files/Common Files/Microsoft Shared/Windows Live:/c/WINDOWS
/system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/Program 
Files/Common Files/Microsoft Sha

red/Windows Live:/usr/lib/lapack
0/tty2W0(2)$ cmd
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\cygwin-1.7\home\lmaschmpath
path
PATH=C:\cygwin-1.7\home\lmaschm\bin;C:\cygwin-1.7\usr\local\bin;C:\cygwin-1.7\bin;C:\cygwin-1.7\bin;C:\cygwin-1.7\usr\X11R6\bin;C:\P
rogram Files\Common Files\Microsoft Shared\Windows 
Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\
WindowsPowerShell\v1.0;C:\Program Files\Common Files\Microsoft 
Shared\Windows Live;C:\cygwin-1.7\lib\lapack


C:\cygwin-1.7\home\lmaschmexit
exit
0/tty2W0(2)$


--

Lee Maschmeyer
Wayne State University
Detroit, Michigan, USA


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread DePriest, Jason R.
On Tue, Dec 1, 2009 at 2:24 PM, Lee Maschmeyer  wrote:
 To verify it, all you have to do is open a bash prompt (Cygw
 0/tty2W0(2)$ echo $PATH
 /home/lmaschm/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/c/Program
 Files/Common Files/Microsoft Shared/Windows Live:/c/WINDOWS
 /system32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/system32/WindowsPowerShell/v1.0:/c/Program
 Files/Common Files/Microsoft Sha
 red/Windows Live:/usr/lib/lapack
 0/tty2W0(2)$ cmd
 Microsoft Windows XP [Version 5.1.2600]
 (C) Copyright 1985-2001 Microsoft Corp.

 C:\cygwin-1.7\home\lmaschmpath
 path
 PATH=C:\cygwin-1.7\home\lmaschm\bin;C:\cygwin-1.7\usr\local\bin;C:\cygwin-1.7\bin;C:\cygwin-1.7\bin;C:\cygwin-1.7\usr\X11R6\bin;C:\P
 rogram Files\Common Files\Microsoft Shared\Windows
 Live;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\system32\
 WindowsPowerShell\v1.0;C:\Program Files\Common Files\Microsoft
 Shared\Windows Live;C:\cygwin-1.7\lib\lapack

 C:\cygwin-1.7\home\lmaschmexit
 exit
 0/tty2W0(2)$

of course if you run cmd from a bash prompt it will have the cygwin
pre-pended path because it inherited it from its parent process

ran mintty from start menu
$ echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/cygdrive/c/Python26/:/cygdrive/c/Program
Files (x86)/ActiveState Komodo IDE 5/ ... etc

ran cmd.exe from start menu
C:\path
PATH=C:\Python26\;C:\Program Files (x86)\ActiveState Komodo IDE 5\ ... etc

no cygwin path even though the bash prompt with the cygwin pre-pended
path is still open and still has the new (or rather, modified) path
variable

-Jason

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Dave Korn
Lee Maschmeyer wrote:
 To verify it, all you have to do is open a bash prompt (Cygwin.bat,
 mintty, rxvt, whatever) and then launch a cmd.exe or powershell.

 Check the path in the bash prompt and you will see the cygwin stuff at
 the beginning of it.

 Check the path in the cmd.exe or powershell prompt which was run
 *after* the bash script updated the path and you will see that it does
 *not* include the cygwin paths.
 
 Well, I just (gasp) tested! And awful lot of bandwidth wasting is being
 done by people who think they know how it works. 

  Even more bandwidth being wasted by people who misread the instructions.
When it says Open a bash prompt and then launch a cmd.exe it doesn't say you
are to launch it /from/ the bash prompt.  It means launch it *after* the bash
prompt in time.

 But for me, at least,
 the path from the invocation of cmd was the same as the path in the
 Cygwin session from which it was invoked. 

  You weren't supposed to invoke it from the Cygwin session.  Of course, you
could point out that the original wording was ambiguous.  I noticed it was
ambiguous too, but rather than vainly assume the OP was stupid and I was
clever, I just worked out which one of the two possibilities the OP must have
intended based on the assumption that he was *not* stupid and since one of
those two possibilities produced exactly the results OP claimed they would it
was obvious which one OP was referring to.

  You would do well to reset your default assumptions about other people.

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Lee Maschmeyer

ran cmd.exe from start menu


And that gets the info into Cygwin - how?


--

Lee Maschmeyer
Wayne State University
Detroit, Michigan, USA


--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



[OT] Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Dave Korn
Lee Maschmeyer wrote:
 ran cmd.exe from start menu
 
 And that gets the info into Cygwin - how?
 

  Yet another false inference.  You were being shown an illustrative
comparison that was supposed to demonstrate a point about the underlying
mechanisms in play, not an answer to the original question from the original
post - if you didn't notice that the thread has gone a looong way off the
original point since then, you *really* aren't paying enough attention.

  You weren't being told a method for how to get the info into Cygwin and
nowhere in Jason's post does it say that you were.  The instructions that we
are discussing begin with the words To verify it ..., not To get the info
into cygwin; perhaps you could stop now, and reread what it /actually/ says
instead of relying further on your clearly inaccurate memory.

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Reinier Post
On Tue, Dec 01, 2009 at 12:42:01PM -0600, DePriest, Jason R. wrote:
 On Tue, Dec 1, 2009 at 10:03 AM, Andy Koppe  wrote:
  2009/12/1 Reinier Post:
  If you want to see the Windows PATH setting unmolested by Cygwin, you
  will either need to strip out the additions set by /etc/profile or avoid
  running under an environment modified by /etc/profile.
 
  It doesn't add, actually - it replaces it.
 
  You're wrong. The Cygwin DLL at startup translates the Windows PATH
  variable. And this line in /etc/profile adds to it:
 
  PATH=/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:$PATH

True.  I grepped for that line, read it, and didn't see the $PATH.
 
 This is completely and totally true.
 
 To verify it, all you have to do is open a bash prompt (Cygwin.bat,
 mintty, rxvt, whatever) and then launch a cmd.exe or powershell.

Not quite.  I did this, but missed the .bash_profile I forgot I created
three years ago.

Sorry.

-- 
Reinier

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Reinier Post
 Windows programs will only ever see a Windows-style PATH no matter what;
 however, they WILL see the Cygwin paths converted to Windows-style and
 prepended IF they were run from a login shell under Cygwin.

Yes, that's how I'm getting these Message too long messages.

-- 
Reinier

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-12-01 Thread Christopher Faylor
On Wed, Dec 02, 2009 at 12:28:31AM +0100, Reinier Post wrote:
Windows programs will only ever see a Windows-style PATH no matter
what; however, they WILL see the Cygwin paths converted to
Windows-style and prepended IF they were run from a login shell under
Cygwin.

Yes, that's how I'm getting these Message too long messages.

Can we *please* stop this discussion now?  There isn't anything new to
add so we're just wasing bandwidth.

cgf

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



how to get the windows PATH env in cygwin

2009-11-30 Thread nwpu053...@gmail.com
how to get the windows PATH env in cygwin. thanks.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Larry Hall (Cygwin)

On 11/30/2009 07:44 AM, nwpu053...@gmail.com wrote:

how to get the windows PATH env in cygwin. thanks.


$PATH returns the value of PATH. For example, to display the path, use echo 
$PATH.
This is not Cygwin-specific though so further discussion is likely to be 
off-topic

for this list.

--
Larry Hall  http://www.rfk.com
RFK Partners, Inc.  (508) 893-9779 - RFK Office
216 Dalton Rd.  (508) 893-9889 - FAX
Holliston, MA 01746

_

A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Chip Panarchy
http://en.wikipedia.org/wiki/Path_%28variable%29

On Tue, Dec 1, 2009 at 6:43 AM, Larry Hall (Cygwin)
reply-to-list-only...@cygwin.com wrote:
 On 11/30/2009 07:44 AM, nwpu053...@gmail.com wrote:

 how to get the windows PATH env in cygwin. thanks.

 $PATH returns the value of PATH. For example, to display the path, use echo
 $PATH.
 This is not Cygwin-specific though so further discussion is likely to be
 off-topic
 for this list.

 --
 Larry Hall                              http://www.rfk.com
 RFK Partners, Inc.                      (508) 893-9779 - RFK Office
 216 Dalton Rd.                          (508) 893-9889 - FAX
 Holliston, MA 01746

 _

 A: Yes.
 Q: Are you sure?
 A: Because it reverses the logical flow of conversation.
 Q: Why is top posting annoying in email?

 --
 Problem reports:       http://cygwin.com/problems.html
 FAQ:                   http://cygwin.com/faq/
 Documentation:         http://cygwin.com/docs.html
 Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread ︶ㄣ無名氏
What i mean is that, how to only get the env path of windows, such as,
`C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem.

`echo $PATH' would display the path of cygwin:
echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin


 $PATH returns the value of PATH. For example, to display the path, use echo
 $PATH.
 This is not Cygwin-specific though so further discussion is likely to be
 off-topic
 for this list.

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Huang Bambo
2009/12/1 �屺��o名氏 tianlij...@gmail.com:
 What i mean is that, how to only get the env path of windows, such as,
 `C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem.

 `echo $PATH' would display the path of cygwin:
 echo $PATH
 /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin

Do you mean SYSTEMROOT or WINDIR environment variable?

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Mark J. Reed
2009/11/30 ︶ㄣ無名氏:
 What i mean is that, how to only get the env path of windows, such as,
 `C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem.

As I understand it, by the time you're in a Cygwin bash shell, the
environment variable has been changed by the Cygwin DLL, and the
original Windows value is gone.  But I believe launching a Windows
process will restore it, so you can try this:

cmd /c echo %PATH%.

Not at my Cygwin box to test, though.

-- 
Mark J. Reed markjr...@gmail.com

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Gary Johnson
On 2009-12-01, ??? wrote:

  $PATH returns the value of PATH. For example, to display the path, use echo
  $PATH.
  This is not Cygwin-specific though so further discussion is likely to be
  off-topic for this list.

 What i mean is that, how to only get the env path of windows, such as,
 `C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem.
 
 `echo $PATH' would display the path of cygwin:
 echo $PATH
 /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin

cygpath -w -p $PATH

Regards,
Gary



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Jeremy Bopp
Gary Johnson wrote:
 On 2009-12-01, ??? wrote:
 
 $PATH returns the value of PATH. For example, to display the path, use echo
 $PATH.
 This is not Cygwin-specific though so further discussion is likely to be
 off-topic for this list.
 
 What i mean is that, how to only get the env path of windows, such as,
 `C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem.

 `echo $PATH' would display the path of cygwin:
 echo $PATH
 /usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/local/sbin:/usr/sbin:/sbin
 
 cygpath -w -p $PATH
 

Just to clarify since there seems to be a little confusion concerning
what the OP needs.  Gary's suggestion will convert the value of the PATH
environment variable as the shell used to run cygpath sees it to a value
which is acceptable by Windows-native applications.  That means that
you'll likely have the additional elements as prepended by /etc/profile
in the result.

If you want to see the Windows PATH setting unmolested by Cygwin, you
will either need to strip out the additions set by /etc/profile or avoid
running under an environment modified by /etc/profile.

-Jeremy

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Andrew DeFaria

On 11/30/2009 06:40 PM, Jeremy Bopp wrote:
Just to clarify since there seems to be a little confusion concerning 
what the OP needs. Gary's suggestion will convert the value of the 
PATH environment variable as the shell used to run cygpath sees it to 
a value which is acceptable by Windows-native applications. That means 
that you'll likely have the additional elements as prepended by 
/etc/profile in the result.


If you want to see the Windows PATH setting unmolested by Cygwin, you 
will either need to strip out the additions set by /etc/profile or 
avoid running under an environment modified by /etc/profile.
Jeeze, not need to go through all that. Simply start the Windows command 
prompt and type in echo %PATH%.

--
Andrew DeFaria http://defaria.com
Some people are like Slinkies . . not really good for anything, but you 
still can't help but smile when you see one tumble down the stairs.



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Dave Korn
Andrew DeFaria wrote:
 Simply start the Windows command prompt and type in echo %PATH%.

  You must need to re-read the subject line, since your suggested method does
not actually answer the question asked.

cheers,
  DaveK

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Andrew DeFaria

On 11/30/2009 08:05 PM, Dave Korn wrote:

Andrew DeFaria wrote:

Simply start the Windows command prompt and type in echo %PATH%.
You must need to re-read the subject line, since your suggested method 
does not actually answer the question asked.
Indeed! You're right. So then the answer is that you can use that to see 
what the Windows PATH is before Cygwin gets to it and you can see the 
resulting PATH variable after Cygwin has modified it (or you can go 
through steps to try to stop Cygwin from modifying it) but there is no 
environment variable for the Windows PATH. You could change 
/etc/profile(?) to export WINDOWS_PATH=$PATH before it starts changing 
it - or maybe you can interrogate the registry. The real question here 
is what does he need the Windows PATH for? If just to look at then echo 
%PATH% in a cmd shell or look at System: Properties: Advanced: 
Environment variables: PATH (Both user and system).

--
Andrew DeFaria http://defaria.com
Is God willing to prevent evil, but not able? Then he is not omnipotent. 
Is he able, but not willing? then he is malevolent. Is he both able and 
willing? Then whence cometh evil? Is he neither able nor willing? Then 
why call him God?



--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple



Re: how to get the windows PATH env in cygwin

2009-11-30 Thread Dave Korn
Andrew DeFaria wrote:
 The real question here is what does he need the Windows PATH for?

  Agreed, it depends what purposes OP wants it for and whether it absolutely
positively has to be the exact windows path(*) or not. For complete accuracy
from within a cygwin environment you'd probably have to could go the whole hog
and use regtool to read both the user and system environment variables from
wherever-it-is-they-live in the registry(**) and then REG_EXPAND_SZ expand and
combine them yourself.  (Could equally use perl, python, or other similar
scripting language that's registry-aware on windows.)


cheers,
  DaveK

-- 
(*) - and even what your definition of the exact windows path is.
(**) - HKLM\System\CurrentControlSet\Control\Session Manager\Environment
andHKCU\Environment

--
Problem reports:   http://cygwin.com/problems.html
FAQ:   http://cygwin.com/faq/
Documentation: http://cygwin.com/docs.html
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple