[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: GNUstep "open" tool
From: |
Tom Hageman |
Subject: |
Re: GNUstep "open" tool |
Date: |
Fri, 23 Nov 2001 01:17:11 +0100 |
Hi Jeff,
On Thu, 22 Nov 2001 11:28:29 -0500, Jeff Teunissen wrote:
> Gregory Casamento wrote:
> >
> > Jeff
> >
> > Actually, I just checked on my NeXT box running OS4.2, the OPENSTEP
> > "open" doesn't do this. When I say:
> >
> > open OpenUp.app (which is in LocalApps on my machine)
> >
> > from a terminal and I am not in a directory which contains the
> > application, it does not automatically launch the application. It says
> > "Can't stat file /home/heron/OpenUp.app." I have tried with several
> > other applications as well. On the other hand, when I type "open
> > somthing.zip" it does get opened or when I go to LocalApps and type
> > "open OpenUp.app" it starts as well.
> >
> > I'm wondering if this could be added as a "feature" for GNUstep, but
> > I'm tempted to maintain compatibility.
>
> Hmm, that functionality must have been added to OS X. I just assumed,
> based on faulty memory, that it was always there.
The NEXTSTEP/OPENSTEP open had an -a flag to do this. Here's its manpage:
====
open(1) UNIX Programmer's Manual open(1)
NAME
open - open files
SYNOPSIS
open [ -a app ] [ -o ] [ -p ] [ -NXHost hostname ] filename
...
DESCRIPTION
The open command opens a file (or a directory), just as if
you had double-clicked the file's icon.
You can specify one or more file names (or pathnames), which
are interpreted relative to the Shell or Terminal window's
current working directory. For example, the following com-
mand would open all WriteNow files in the current working
directory:
open *.wn
ARGUMENTS
-a specifies an application to use for opening the
file.
-o opens the file (can be used in combination with
-p).
-p causes the file to be printed instead of opened.
-NXHost opens the file on the specified host (if its window
server is public).
====
Another interesting feature that isn't apparent from this manpage is that
it could be used to pipe text into, like:
ps -auxwwww | open
It would open in Edit, or the default application in general. It even
did the sensible thing with rtf (opened as rich-text in Edit) and eps
files (opened in Preview). (Actually, it just writes out its input in a
temporary file in /tmp (possibly with an .rtf or .eps extension if so
gleaned from the data), and opens that.)
--
__/__/__/__/ Tom Hageman <trh@xs4all.nl> (home) [NeXTmail/Mime OK]
__/ __/_/ <t.hageman@proteon.nl> (work) [Mime OK]
__/__/__/
__/ _/_/ [ObjC retain];
objc: FREED(id): message retain sent to freed object=0xdeadcafe
- Re: GNUstep "open" tool, (continued)
- Re: GNUstep "open" tool, Nicola Pero, 2001/11/22
- Re: GNUstep "open" tool, Stefan Böhringer, 2001/11/23
- Re: GNUstep "open" tool, Nicola Pero, 2001/11/23
- Re: GNUstep "open" tool, Jeff Teunissen, 2001/11/23
- Re: GNUstep "open" tool, Nicola Pero, 2001/11/23
- Re: GNUstep "open" tool, Dan Pascu, 2001/11/23
- Re: GNUstep "open" tool, Gregory Casamento, 2001/11/24
- Re: GNUstep "open" tool, Dan Pascu, 2001/11/24
- Re: GNUstep "open" tool, Gregory Casamento, 2001/11/24
- Re: GNUstep "open" tool, Jeff Teunissen, 2001/11/22
- Re: GNUstep "open" tool,
Tom Hageman <=
- Re: GNUstep "open" tool, Gregory Casamento, 2001/11/23
- Re: GNUstep "open" tool, Pascal Bourguignon, 2001/11/23
Re: GNUstep "open" tool, Jason Clouse, 2001/11/23