Welcome, Guest. Please login or register.

Author Topic: Looking for OS 3.9 equivalent to OS X's "open" command  (Read 1143 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline yorgleTopic starter

  • Full Member
  • ***
  • Join Date: Jan 2007
  • Posts: 165
    • Show only replies by yorgle
    • http://umlautllama.com
Looking for OS 3.9 equivalent to OS X's "open" command
« on: February 23, 2010, 08:45:50 PM »
So on my Mac, i'm always using the 'open' command. here's the man page for it:

http://developer.apple.com/mac/library/DOCUMENTATION/Darwin/Reference/ManPages/man1/open.1.html

TL;DR
- type 'open dirname' to open the directory as an intuition window,
- type 'open filename.txt' to open that file with its default app
- type 'open -a myEditor.app filename.txt' to open that file in myEditor application

Now, I've got the directory side of things figured out.  I found 'openwin' which does the directory side;  it opens a spefied directory or the current directory:

http://aminet.net/package/util/cli/openwin

As for the file side of things, I'm having some trouble finding the right thing.

I'm pretty certain that whatis.library will play an important part, to determine file type.  I tried 'exa' which seemed to pop up a window where i could configure it to allow me to create a list of things to open it with, and i've tried Action as well.  None of them quite fit the bill.  I'd like to not have to click in any windows once i type 'open'.  perhaps this is not an option without me writing something...

but I figured I'd see if anyone has any suggestions...
 

Offline Karlos

  • Sockologist
  • Global Moderator
  • Hero Member
  • *****
  • Join Date: Nov 2002
  • Posts: 16879
  • Country: gb
  • Thanked: 5 times
    • Show only replies by Karlos
Re: Looking for OS 3.9 equivalent to OS X's "open" command
« Reply #1 on: February 23, 2010, 08:59:02 PM »
In OS3.5+, workbench has an arexx port. It wouldn't be difficult to write a shell script to take advantage of that in order to open the directory as a workbench window.

As for the second use, well, you could just use multiview .

For the third use, well, if the editor (or other application) supports CLI parameters, just use them as is.
int p; // A
 

Offline kolla

Re: Looking for OS 3.9 equivalent to OS X's "open" command
« Reply #2 on: February 23, 2010, 09:43:33 PM »
wbrun does what you want, and uses deficons.
B5D6A1D019D5D45BCC56F4782AC220D8B3E2A6CC
---
A3000/060CSPPC+CVPPC/128MB + 256MB BigRAM/Deneb USB
A4000/CS060/Mediator4000Di/Voodoo5/128MB
A1200/Blz1260/IndyAGA/192MB
A1200/Blz1260/64MB
A1200/Blz1230III/32MB
A1200/ACA1221
A600/V600v2/Subway USB
A600/Apollo630/32MB
A600/A6095
CD32/SX32/32MB/Plipbox
CD32/TF328
A500/V500v2
A500/MTec520
CDTV
MiSTer, MiST, FleaFPGAs and original Minimig
Peg1, SAM440 and Mac minis with MorphOS