Welcome, Guest. Please login or register.

Author Topic: THOR's Shell Hacks  (Read 35229 times)

Description:

0 Members and 1 Guest are viewing this topic.

Offline olsen

Re: THORs Shell Hacks
« on: February 09, 2015, 01:26:43 PM »
Quote from: Thomas Richter;783373
No, H&P didn't, but I did. Remember, the 3.9 shell is not by H&P and was only contributed to H&P under a separate contract. The reason why IconEdit is the one from 3.1 is because H&P did not want to contribute reaction.  Thus, yes, the Os 4.0 shell is pretty much the one from Os 3.9. I don't know how many fixes I made later on where integrated into the 4.x release, but I made sure that Olsen always had access to my code.
If I remember correctly, we had to start over from scratch for OS4, regarding the components which make up what is commonly lumped together as "the shell".

Those components are 1) the user interface which you use to enter commands, edit command lines, perform copy & paste and which displays the output of commands, and then there is 2) the part which loads and runs these commands. These are Kickstart modules named "con-handler" (1) and "shell" (2).

The major reasons for starting over were in portability (ViNCed was written in 68k assembly language, and would have had to be reimplemented), and the unresolved limitations of the "shell" Kickstart module which, for example, in Kickstart versions 2.04 through 3.1 had a fixed upper limit for the length of an individual command line (the OS4 version has no fixed upper limit).
 

Offline olsen

Re: THORs Shell Hacks
« Reply #1 on: December 06, 2017, 09:16:17 AM »
Quote from: Thomas Richter;833827
Well, I thought about this issue. It is really a bit tricky, and there are more inconsistencies in the shell I want to get rid of.

Last but not least, we have one outsider, and this is the "rx" command. Unfortunately, this is not fixable as "rx" with arguments in quotes executes the script literally, i.e.
Code: [Select]

rx "say hello"
prints "HELLO" on the screen, whereas
Code: [Select]

rx say hello
executes the rexx script "say" (if it exists) with the argument "hello".

This all becomes a bit pathetic in case you have a volume named "say hello", as then the shell puts quotes around the volume name. Or to keep it simple, a rexx script on the "Ram Disk:". One cannot, possibly, execute it from there:
Code: [Select]

"Ram Disk:test.rexx"
on the shell will not work whatsoever, since the double quotes are needed to escape the volume name, but it changes the meaning of what "rx" attemts to do. Namely here not to execute a script on "Ram", but to execute the Rexx command "Ram" (which does not exist), with the argument "Disk:test.rexx". Bummer!

Replace "Ram Disk:" by "RAM:" and things work, but I guess Bill hasn't thought this one to the very end.

I hope there were people out here who could follow. This is all touchy business.


The ARexx shell commands might be fixable. I rewrote all of them in 'C' for AmigaOS4. The rx command is weird, though, but at least the 'C' language version uses ReadArgs() and falls back onto parsing GetArgStr() in case the "command line parameters" are a single line ARexx program.