PATHEXT is fundamental to Windows and Should be recognised by CYGWIN
Erik Soderquist
ErikSoderquist@gmail.com
Tue Aug 9 15:39:00 GMT 2016
On Tue, Aug 9, 2016 at 8:58 AM, cyg Simple wrote:
> I tried "chmod +x foo.txt; ./foo.txt" but that results in Cygwin
> assuming the text file is a script and executing each line of the file.
> If PATHEXT were used only to determine that the file should be passed to
> ShellExecute instead it might be beneficial but since I can easily just
> do "cmd /c foo.txt" then probably not so much.
That is the behavior I would expect in any *nix environment, and
therefore consider the correct behavior within cygwin.
Additionally, starting a text editor for foo.txt is not a function of
PATHEXT, but rather of file association. In CMD.EXE,
C:\tmp>echo some text >foo.txt
C:\tmp>foo
'foo' is not recognized as an internal or external command,
operable program or batch file.
C:\tmp>echo echo some text >foo.cmd
C:\tmp>foo
C:\tmp>echo some text
some text
C:\tmp>
PATHEXT looks for *executable* files, not file association. I warned
previously in this thread about getting the two confused.
-- Erik
--
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
More information about the Cygwin
mailing list