[comp.sys.apple] path variale addition to basic.system...

bh1e+@ANDREW.CMU.EDU (Brendan Gallagher Hoar) (02/08/90)

Hmmm...

has anyone looked into adding a routine to basic system that allows
the use of external commands WITH a path variable?

Say you set

$PATH = /h1/commands:/h1/basicdev/beta.comds...

then if you type at the prompt

]reboot

it scans the paths to see if you have a program of type CMD called
reboot.

if you do, it executes it at $XXXX (stadardized).
if you don't, it passes it on...

it would  have to know what to pass on immediately (with a\ table of
ProDOS and BASIC commands), or it would build a table of files in the
paths at start of execution and not have to scan ever.

Good idea?  or bad?

(probably would require aux ram...disabling the RAMDISK)

greyelf@wpi.wpi.edu (Michael J Pender) (02/15/90)

In article <cZoMd6m00WB48I9P9x@andrew.cmu.edu> bh1e+@ANDREW.CMU.EDU (Brendan Gallagher Hoar) writes:
>has anyone looked into adding a routine to basic system that allows
>the use of external commands WITH a path variable?

Yes, someone has, I did.  I did about a year ago.  It was called SHELL
and is available from a lot of FTP sites, and probably apple2-l also.

>Say you set
>$PATH = /h1/commands:/h1/basicdev/beta.comds...

Actually I had the path automagically set by the startup program and
included a command to change the command directories path.

>then if you type at the prompt
>
>]reboot
>
>it scans the paths to see if you have a program of type CMD called
>reboot.

When and if you find shell you'll see a command called bootslot.
It allows you to do exactly that, boot from any slot.

>if you do, it executes it at $XXXX (stadardized).
>if you don't, it passes it on...

Acutally shell used the smart execution command, it could run basic,
binary, system, or exec files without flinching.

>it would  have to know what to pass on immediately (with a\ table of
>ProDOS and BASIC commands), or it would build a table of files in the
>paths at start of execution and not have to scan ever.
>
>Good idea?  or bad?

I liked the idea.  :^)

>(probably would require aux ram...disabling the RAMDISK)

Nope.  the advantage of disk based commands is that you can have a lot
of them, on disk, not sucking up memory.  I designed shell so it could
use the ramdisk for speed if a person wanted, but did not 
require it, so that anyone who can run prodos 8 can run Shell.

If it still has the little notice saying to send me money ignore it,
just send me a little note saying its actually useful.

---
Michael J Pender Jr  Box 1942 c/o W.P.I.   W.O.S. is not dead.
greyelf@wpi.bitnet   100 Institute Rd.     ...its time to get started,
greyelf@wpi.wpi.edu  Worcester, Ma 01609   there is much to be done.
If my next computer isn't a IIgs, it won't be an apple... Me.