List %F%N will list the files in the current dir with their full parent paths prepended (in your example just the volume name of your system partition).
7.Amiga OS 4:S/ARexx> help assign ok here help is read with more 7.Amiga OS 4:S/ARexx> list help help 7165 -s--rwed 20-Sep-09 00:06:54 1 fichier - 6K octets - 8 blocs utilisés 7.Amiga OS 4:S/ARexx> sys: 7.Amiga OS 4:> help path Code de retour 51 : Program not found 7.Amiga OS 4:> path Répertoire_courant RAM Disk: Amiga OS 4:C Amiga OS 4:S/Shell Amiga OS 4:S/ARexx ... 7.Amiga OS 4:>
@JosDuchIt The reason for the behavior you observed when you enter "help path" without the alias is that you have spaces in your system partition name (Amiga OS 4).
If you relabel your system partition to remove the spaces, the ARexx help will work as it should. You may have additional ARexx problems in the future if you leave the spaces in your system partition name.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
@nbache His problem with the ARexx Help script is caused by the spaces in his system partition label. If you temporarily relabel your system partition with spaces in the name and try to call help from the shell command line (help path) without SYS:C/ARexx as the current directory, you will see the same result as he gets. If you run Snoopy and enter "help path" when the current directory is your system partition (SYS:) and then enter "help path" when SYS:S/ARexx is the current directory, you will see what is going wrong.
There is also a bug in the ARexx Help script that causes it to fail if the user keeps his system partition write protected (locked) like I do. I fixed the script to eliminate the bug on my system so it doesn't concern me anymore.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
Since "Help" for shell commands (C: commands) has been mentioned, it might be worth pointing out that you can also double-click SYS:System/Help and get help with all the shell commands. If you are using a KCON shell console, you can also enter SYS:System/Help <command-name>.help to see the help for a single command without using the "more" command.
I use these aliases in my shell-startup:
alias help "run SYS:System/Help" - opens the help window alias helps SYS:System/Help [].help - displays help for a specific command in the shell window (e.g. help path).
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
His problem with the ARexx Help script is caused by the spaces in his system partition label.
Ah, I didn't notice that - thanks.
Well, the best advice there is to rename that system partition! One thing is to have a space in "RAM Disk:", and that has over time helped to reveal many bugs in various programs. But doing it to your system partition is just plain masochistic.
ARexx is a pretty difficult beast about quoting the arguments a script receives, to be able to have spaces etc. in them. I'm not totally convinced there is any good way to fix the script so it can handle it.
Quote:
There is also a bug in the ARexx Help script that causes it to fail if the user keeps his system partition write protected (locked) like I do.
Hmm, is that because your T: is assigned to a directory on SYS: instead of as default in RAM:? Every system I know requires a temp dir of some sort to be writable. T: is what we use in AmigaOS. It is not reasonable to expect things to work if T: is not writable.
Quote:
I fixed the script to eliminate the bug on my system so it doesn't concern me anymore.
Xenic ranted: Quote: There is also a bug in the ARexx Help script that causes it to fail if the user keeps his system partition write protected (locked) like I do.
Hmm, is that because your T: is assigned to a directory on SYS: instead of as default in RAM:? Every system I know requires a temp dir of some sort to be writable. T: is what we use in AmigaOS. It is not reasonable to expect things to work if T: is not writable.
No I just did a quick test by locking sys: (must remember to unlocl it again!).
The redirection at line 80 fails, a quick check of the code shows that the global 'tmpfile' variable is not exposed in the function.
The tmpfile variable is used throughout the script but is only a problem in the getpager procedure. It works in function calls (like getlanguage) but not in getpager which is declared a PROCEDURE. I guess the "takeaway" from this bug is that an ARexx PROCEDURE does not necessarily have access to a script's global variables.
I solved the problem here by sending "tmpfile" as an argument to the "getpager" PROCEDURE like this:
I noticed it when I ran Snoopy to identify the problem. The same problem will occur when you try to run an ARexx script from a shell when there is a space in the path. For example try something like this:
Makedir "Data:test dir" ( where Data: is a partition) Copy C:List TO "Data:test dir" Copy "SYS:S/ARexx/Help" TO "Data:test dir" "Data:test dir/list" ram: "Data:test dir/Help" path
The list command will work but the ARexx Help script won't.
The bottom line is that if you want ARexx scripts to work reliably, don't use spaces in partition labels, directory names or file names. That's why my RAM: is labeled "Ram_Disk:" and not "Ram Disk".
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
sys:System/Help is nt documented on my system and has no template.
It's not documented and as far as I can tell there are no command line arguments read by SYS:System/Help. I figured out how to use it by trial-and-error. It's a simple program but could use some TOOLTYPES and shell arguments to make it more useful. It would be handy if there were TOOLTYPES/ARGS to set the window size, make it append ".help" when only command names are given, add an additional search directory where you could add help files for 3rd party commands etc.
The only reason we still need the ARexx help script is because we don't have a system shell (console actually) that has a scrollbar like KingCON. Otherwise it could be replaced by the SYS:System/Help command. For now we need the script because it uses "more" to split the help text into segments that will fit in the visible console window.
Amiga X1000 with 2GB memory & OS 4.1FE + Radeon HD 5450
guess the "takeaway" from this bug is that an ARexx PROCEDURE does not necessarily have access to a script's global variables.
For emphasis if you declare a function with the PROCEDURE keyword in ARexx it creates a new scope, *no* global are visible in that scope unless they are included in the EXPOSE list.
Your solution of adding tmpfile as an argument works but it's cleaner just to add it to the expose list as it's functioning as a global.
Quote:
It's not documented and as far as I can tell there are no command line arguments read by SYS:System/Help. I figured out how to use it by trial-and-error. It's a simple program but could use some TOOLTYPES and shell arguments to make it more useful. It would be handy if there were TOOLTYPES/ARGS to set the window size, make it append ".help" when only command names are given, add an additional search directory where you could add help files for 3rd party commands etc.
Your right about lack of docs as far as I can see there aren't any. I'll review your suggestions above and make some enhancement request if they don't allready exist.
Quote:
The only reason we still need the ARexx help script is because we don't have a system shell (console actually) that has a scrollbar like KingCON. Otherwise it could be replaced by the SYS:System/Help command. For now we need the script because it uses "more" to split the help text into segments that will fit in the visible console window
erm...
alias helps "sys:System/Help [].help | more"
works well for more, but for alternate pagers like multiview it's a bit more tricky.