Page 1 of 1

WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Sat Apr 25, 2020 1:57 pm
by BatteMan
In the topic dedicated to Amidock, we talked about WShell, a wonderful Shell/CLI replacement made by William S. Hawes. The version 2.0 is dated from november 1991 and it's this version I installed on my Workbench 1.3.

Image

WShell brings us a lot of things : first of all, a commands history, but it also adds a log with scrollbar, completion of file name (by default with ESC), a lot of hotkeys (F2 puts WShell in fullscreen), adds more autocompletion with some commands (for example : type "rename myfile" and WShell automagically writes "rename FROM myfile TO myfile"), etc.

The documentation is a bit huge, 128 pages, but is really useful and well written.

But, I'll share with you what I added in my S:Startup-sequence and S:user-startup to make WShell fully works on my WB1.3 :

I added a line in the startup-sequence to launch the new s:user-startup I added in my S: (for more readibility) :

Code: Select all

execute s:user-startup
Then, my user-startup is dedicated to assign and to launch all my other stuffs, including WShell of course, so :

Code: Select all

; BEGIN WShell
copy S:env/ ENV: ;>NIL:
assign remove CON:        ; Remove the CON: device
C:DHOpts CON: PIP:         ; Mount the DisplayHandler
C:FComp ;>NIL:                  ; Path completion
; END WShell
Everything behind a ";" is a comment.
You can add, if you want, a line with "SetExecute", it'll replace "Execute" and will use WShell for every "Execute" command.

After that, you can personalize some files : "S:WShell-Startup", "S:Config-WShell" and "S:Config-FComp" files. Here, I only modified the "S:Config-FComp" file, to use the TAB key for the completion instead of the ESC key ("KEY 66 QUAL 0") and to remove all shortcuts using numbers of the numerical keypad.

That's all, folks ;)


Even if we can find it somewhere on the web, you can now download this "all inclusive" lha archive (with the ADF, the documentation and the text file which explains the keymap for FComp).

And, if you want the original disk and documentation, I was surprised to see MyAmigaShop.com selling the 2.0 version and the 1.05 version. I don't know this reseller and I can't buy it for the moment, due to the lockdown, so only US customers can take their chance.


Source : Amigalog.com

Re: WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Sat Apr 25, 2020 3:14 pm
by intric8
Thanks for sharing the LHA, Batteman (and all that great info)!

Re: WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Sun Sep 13, 2020 6:55 pm
by intric8
I wanted to add a few updates to this very interesting thread.

This weekend I got my hands on an original copy of WShell 2.0 and installed it to my A3000's OS 1.3 partition.

The installation was a little bit nerve-wracking, but in the end I got everything in the correct location. But more importantly, I got it to run from the AmiDock in 1.3, which I never would have solved on my own without Batteman's help.
amiDock.png

In AmiDock, this is what the Add/Edit screen looked like for me in the end:
amiDockWShell2.png

For those that might be wondering what all the fuss is about, note how I can launch this highly impressive 3rd-party Shell from my dock, and how it has a scrollbar, close widget in the UI and even command history (which the Amiga Shell offers, but CLI does none of the above).
One other enhancement Batteman helped me with was getting the prompt to actually show the current directory when you go up and down the chain, rather than the timestamp like the WShell default.

I had to go into my Config file, wipe out the format that was there for the prompt, and replace it with:

Code: Select all

prompt "%c>"



I actually attempted to go one step further. I was sure I'd read somewhere that WShell could be used in place of our original, kinda crappy UI built-in CLI. But after much research and experimentation I'm of the belief now that it simply isn't possible in OS 1.3.

I found this (page 24 of the WShell manual):
Screen Shot 2020-09-13 at 6.20.54 PM.png

If I read that correctly, you actually can make OS 2.0 call the WShell during the startup sequence instead of the CLI, which is awesome. And, since my A3000 has both environments I'll go about that process in the near future.

FWIW I did try to make my 1.3 environment call WShell using these scripts and I was able to get the machine to not lock up, but ultimately I couldn't get it to call it and use it properly. Soooo close! I'm not complaining, though. I love having the WShell option at the click of a button on the desktop now.

Re: WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Sun Sep 13, 2020 7:33 pm
by intric8
Actually, after watching this video closely it gives me hope that maybe someday I'll figure out how to non-destructively make WShell the default across the board for 1.3. This seems to imply it is indeed possible. Somehow. (Or, he simply deleted the Shell and put WShell in its place). But note how WShell takes over during the startup-sequence process, too.

Giuseppi Portelli:


Re: WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Mon Sep 14, 2020 1:29 am
by BatteMan
In fact, the startup-sequence launches a selection script with WShell :
NewWSH "CON://640/256/WShell/CLOSE" FROM S:selector-script QUIET
The page made by Giuseppe helped me a lot : http://www.amigalog.com/amigados-part-t ... sequences/ ;)

Re: WShell, the ultimate CLI by William S. Hawes (mister ARexx)

Posted: Mon Sep 14, 2020 10:13 am
by intric8
Yes, I read through that very carefully. I even experimented with some of his code and got it to the point where WShell was launching on top of my Workbench icons (which I didn't want, but it was interesting).

But even in his own code I can see that the default Shell-Seg by CLI is in use. I was trying to swap that out with WShell's SEG but it would hang the system. At the end of the day, I'm going to move over to WB 2.0 next and get that as maxed out with WShell as I can. I think I'm as far as I'm going to go with 1.3 - and I love it.