This is the mail archive of the
mailing list for the Cygwin project.
Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN
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
'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>echo some text
PATHEXT looks for *executable* files, not file association. I warned
previously in this thread about getting the two confused.
Problem reports: http://cygwin.com/problems.html
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple