[Coco] Nitros9/Scripts question

Bill Pierce ooogalapasooo at aol.com
Wed Dec 10 11:20:44 EST 2014


Kandur, chd is not a "cmd" in the sense of being a separate file like other cmds such as dir or format. chd is an internal cmd in shell. So you would have to rewrite shell to do this. I don't think you want to open that can of worms.
 

Bill Pierce
"Today is a good day... I woke up" - Ritchie Havens
 

My Music from the Tandy/Radio Shack Color Computer 2 & 3
https://sites.google.com/site/dabarnstudio/
Co-Contributor, Co-Editor for CocoPedia
http://www.cocopedia.com/wiki/index.php/Main_Page
E-Mail: ooogalapasooo at aol.com


 
 
-----Original Message-----
From: Kandur <k at qdv.pw>
To: CoCoList for Color Computer Enthusiasts <coco at maltedmedia.com>
Sent: Wed, Dec 10, 2014 11:02 am
Subject: Re: [Coco] Nitros9/Scripts question


Having red the last 6 responses this morning,
I thought why not just redirect the input for the chd command?
Built a file '2cmds' containing this single line:
/dd/cmds
Then entered: 
chd <2cmds - it resulted in error 215.
with chd <<2cmds - got the same result.
Well, the chd command expects an argument
from the standard input, in my case from Term.
Could we modify it so, that it would read 
a file instead of Term, and call it chdd  e.g.?

Kandur

Wednesday, December 10, 2014, 6:53:50 AM, you wrote:
> 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

-- 
Coco mailing list
Coco at maltedmedia.com
https://pairlist5.pair.net/mailman/listinfo/coco


 


More information about the Coco mailing list