delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/07/21/16:55:05

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020721134620.01f8a950@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sun, 21 Jul 2002 13:56:14 -0700
To: "Qiezi ." <wodeqiezi AT hotmail DOT com>, cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: an ``open'' command which resolves file associations
In-Reply-To: <F80PtS6EeCUGbqYfwjn000173d2@hotmail.com>
Mime-Version: 1.0

--=====================_111302562==_
Content-Type: text/plain; charset="us-ascii"; format=flowed

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

--=====================_111302562==_
Content-Type: application/octet-stream; name="open"
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="open"

IyEvYmluL2Jhc2gKCgojIE9wZW4gYW55IGZpbGUgaW4gdGhlIGNvcnJlY3QgcHJvZ3JhbSBiYXNl
ZCBvbiB0aGUgY3VycmVudCBzeXN0ZW0td2lkZQojCWFzc29jaWF0aW9uIGZvciB0aGUgZmlsZSB0
eXBlIChzdWZmaXgpCgojCQljbWQgL3EgL2Mgc3RhcnQgL2IgJChjeWdwYXRoIC13ICIkYXJnIikg
Mj4vZGV2L251bGwgfHwgJHtFRElUT1I6LXZpfSAiJGFyZyIKCmZvcmNlT3Blbj0KCmZvciBhcmc7
IGRvCgljYXNlICIkYXJnIiBpbgoJLWYpCgkJZm9yY2VPcGVuPTEKCQk7OwoKCWh0dHA6Ly8qKQoJ
CWNtZCAvcSAvYyBzdGFydCAvYiAiJGFyZyIKCQk7OwoKCWZpbGU6Ly8vKikKCQlmaWxlTmFtZT0i
JHthcmcjZmlsZTovLy99IgoKCQlpZiBbICEgLWYgIiRmaWxlTmFtZSIgXTsgdGhlbgoJCQllY2hv
ICJvcGVuOiBcIiRhcmdcIiBkb2VzIG5vdCBleGlzdC4iID4mMgoJCWVsc2UKCQkJY21kIC9xIC9j
IHN0YXJ0IC9iICIkZmlsZU5hbWUiCgkJZmkKCQk7OwoKCSpcICopCgkJZWNobyAib3BlbjogRXJy
b3I6IENhbm5vdCBvcGVuIGZpbGVzIHdpdGggc3BhY2VzIGluIHRoZWlyIG5hbWUuIiA+JjIKIwkJ
aWYgWyAhIC1mICIkYXJnIiBdOyB0aGVuCiMJCQllY2hvICJvcGVuOiBcIiRhcmdcIiBkb2VzIG5v
dCBleGlzdC4iID4mMgojCQllbHNlCiMJCQlkb2NGaWxlV2luPSIkKGN5Z3BhdGggLXcgIiRhcmci
KSIKIwkJCWNtZCAvcSAvYyBzdGFydCAvYiAiJyRkb2NGaWxlV2luJyIKIwkJZmkKCQk7OwoKCSop
CgkJIyBSZXNvbHZlIHN5bWJvbGljIGxpbmtzCgkJd2hpbGUgWyAtTCAiJGFyZyIgXTsgZG8KCQkJ
YXJnPSIkKHJlYWRsaW5rICIkYXJnIikiCgkJZG9uZQoKCQlpZiBbICEgLWYgIiRhcmciIF07IHRo
ZW4KCQkJZWNobyAib3BlbjogXCIkYXJnXCIgZG9lcyBub3QgZXhpc3QuIiA+JjIKCQllbHNlCgkJ
CWlmIFsgJGZvcmNlT3BlbiBdOyB0aGVuCgkJCQljaG1vZCAreCAiJGFyZyIKCQkJZmkKCQkJZG9j
RmlsZVdpbj0iJChjeWdwYXRoIC13ICIkYXJnIikiCgkJCWNtZCAvcSAvYyBzdGFydCAvYiAiJGRv
Y0ZpbGVXaW4iCgkJZmkKCWVzYWMKZG9uZQo=

--=====================_111302562==_
Content-Type: text/plain; charset=us-ascii

--
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/
--=====================_111302562==_--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019