[Coco] Nitros9/Scripts question
Tormod Volden
lists.tormod at gmail.com
Wed Dec 10 09:53:50 EST 2014
On Wed, Dec 10, 2014 at 3:12 PM, Bill Pierce via Coco wrote:
>
> There is a "path" cmd for shell Plus 2.2a... there has been (at least) since shell plus 2.1. According to the shellplus sources, the "path" buffer is 400 bytes so a lot of paths could be set. Read the "Path=" section on page 10 of the ShellPlus docs in the NitrOS9 repo.
>
>
> (from my Nitros9 3.3.0 l2 cmd line)
> path=/dd/cmds /x1/cmds /dd/kingsquest3/cmds<enter>
> path=?<enter>
> /dd/cmds
> /x1/cmds
> /dd/kingsquest3/cmds
>
>
> The above shows the output from my Coco.
> I remembered someone mentioning this a while back and then it came up again in the discussions of Bob Devries' L3 boot disk... in which he had a "config.os9" file in "/d0/sys/config.os9" which contained a "path=" list. This was pointed to by the "custom" cc3go that Bob had apparently built, which after running "startup -P", it ran "/d0/sys/config.os9" which set the system paths.
> The config.os9 file contained :
> i=/1 /PATH=d0/cmds (/xx/xxxx /xx/xxxx etc. each separated by a space)
>
> The "i=/1" makes it apply to the exsisting shell therefore preserving the paths after the process dies (I think).
>
> I suspect this could also be done in the startup or mods could be done to "sysgo" to do what Bob's "cc3go" did. I disassembled Bob's cc3go and it only takes a few lines to add the check for "config.os9" (and a few more for the error bypass to the defaults if not found)
> Bob could you elaborate on this?
>
>
> Of course this would not solve the problem of CHDing to another dir on startup (which BTW, is what started this thread), but it will set more options for where your shell looks when you type a cmd to run.
For this you would need to modify the shell to read commands from a
file when it starts, before reading from the console. And not just run
a startup file in a new shell like it does now.
Tormod
More information about the Coco
mailing list