This is the mail archive of the cygwin@cygwin.com 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: an ``open'' command which resolves file associations


Qiezi,

The attached shell (BASH) script works fine for me.

It doesn't have any help output, so I'll give a quick run-down here:

open [ option | target ] ...

Options:
-f Force (chmod +x first)
-n Don't execute (echo what would be done instead)

Targets:
file name, relative or absolute including Cygwin symlinks
URL using "file:", "http:" or "https:" schemes

The one major limitation I've never been able to work around is the inability to open files with spaces in their names. I have to believe there's a way to make it work, but nothing I tried worked, so I just gave up. If anyone can fix this, I'd really appreciate getting the changes fed back to me.

Randall Schulz
Mountain View, CA USA


At 13:05 2002-07-21, you wrote:
Hello,

I've been wondering for a long time whether someone had written a program for cygwin to do what NeXT's open(1) program does. At least in the current incarnation, under OSX, open resolves file-type associations at the command line and opens a file.

Do any list readers know of any perl programs, or scripts which perform this functionality under cygwin? I haven't spent much time programming under windows, but it doesn't seem that difficult to read the registry file, build a hash, etc. I always sort of figured someone else had already done it but didn't know who or where.


ciao and thanks,
Qiezi

Attachment: open
Description: Binary data

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

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