This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATHEXT is fundamental to Windows and Should be recognised by CYGWIN



On 8/9/2016 9:07 AM, Marco Atzeri wrote:
> On 09/08/2016 14:58, cyg Simple wrote:
>>
>>> So, if we actually implement PATHEXT, its usage would be limited to
>>> suffixes of binary files and files starting with #!<interpreter>, or we
>>> would have to use a way to start an application which doesn't work well
>>> in a POSIX scenario, or we would have to search the registry for the
>>> suffix linkage.  Additionally to searching a variable number of files
>>> for each single file access.
>>
>> 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.
> 
> try "cygstart foo.txt"
> 

And then you can do:

ln -s foo.txt foo
cygstart foo

OR you can do

alias foo="cygstart foo.txt"
foo

-- 
cyg 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]