which?
Malcolm Hussain-Gambles (1596) 811 posts |
I’m attempting to track down a version of canonical that I have somewhere on RISC OS that is causing me problems. |
dave_j (3231) 50 posts |
|
Chris Evans (457) 1614 posts |
What is wrong with the filer’s find option? |
Jeffrey Lee (213) 6046 posts |
The filer’s find option will tell you where something is, but if you’ve got multiple files with the same name it won’t tell you which one will be used when you enter the program name at the command line. On Unix systems ‘which’ just checks $PATH, the RISC OS version linked above also checks system variable aliases and modules in order to mimic the behaviour the kernel uses for OS_CLI. |
Malcolm Hussain-Gambles (1596) 811 posts |
@dave_j Thanks! @Chris – The filer couldn’t cope and bombed out (too many open files) – which is kind of weird. |
GavinWraith (26) 1531 posts |
It is just this sort of experience that makes one wish that RISC OS modules had been designed from the start with private namespaces, so that *canonical would simply have produced Command not found and *Debug.canonical would have worked OK. A similar discipline for applications defining system variables would make life a bit safer, too (though more verbose :(). |
Rick Murray (539) 13400 posts |
I’ve been in this game. My standard “hack” is to open a TaskWindow, type in |
Rick Murray (539) 13400 posts |
As for private namespaces, that would ruin the RISC OS idea of terminal truncation, where *Co. means something1, as does *A. or even *St. ;-) About the only time I’ve seen namespace use in commands is filesystem commands such as *SCSI:devices … or is it *-scsi-devices? I forget, it’s been forever since I had a SCSI bus on my A5000… 1 But not necessarily the same meaning from one release of RISC OS to the next. ;-) |
Chris Hall (132) 3500 posts |
*Command – filesystem – (without the spaces) |
GavinWraith (26) 1531 posts |
Using a full stop would, yes. But I was using the full stop because lots of OO languages use that for object-attributes. Any small symbol would do the job. Maybe an underscore? It was not a serious suggestion, only a sigh ;) |