Shell and Arexx?

A forum for general AmigaOS 4.x support questions that are not platform-specific

Shell and Arexx?

Postby Raziel » Fri Mar 10, 2017 10:35 am

I take it the new Shell doesn't have an Arexx port?

I would like to write a script which checks for an already open shell and if there is simply activate it and open a new tab instead of spawning a complete new shell.

Sometimes my shell window is buried deep underneath other windows and i end up with dozens of shells (because i forgot about it being open) which kind of counteracts the new shell tab possibility.

Is there any chance to do that without writing something that patches into the system?

I tried the Workbench Arexx functionality but that does seem to affect only drives, drawers and the Workkbench window itself, but not programs.

Thanks in advance
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 767
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: Shell and Arexx?

Postby tonyw » Fri Mar 10, 2017 11:24 am

No, the Shell does not have an ARexx port.

I put some thought into it some years ago, but there are three components involved: the Shell (Kickstart/shell.kmod), the I/O handler (console handler, Kickstart/con-handler) and the display (console device, Kickstart/console.device). Only the console device has a menu and that serves only to control the console window.

What do you want to do with the ARexx port? If you just want to write stuff to the screen, you would probably want to add commands upstream of the con-handler, where the interface is a CON: device.
If you want to change the look or configuration of the console window, then you would still need to add commands upstream of the con-handler, so that it is aware of the changes to its output device. I guess that this is what you want to do, by creating new console tabs in an existing window. For that, you need a new CON: instance, and only the Shell or the built-in "Execute" command can do that (Execute "NewShell CON://...).
Lastly, if you want to issue shell commands, then you need to interface at the user input level - you may as well use the built-in "Execute" command to do that for you, too.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Shell and Arexx?

Postby broadblues » Fri Mar 10, 2017 2:22 pm

Sometimes my shell window is buried deep underneath other windows and i end up with dozens of shells (because i forgot about it being open) which kind of counteracts the new shell tab possibility.


I use the DepthToFront commodity to find burried shell windows, not quite what you are asking about, but an alternate solution.
User avatar
broadblues
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 478
Joined: Sat Jun 18, 2011 3:40 am
Location: Portsmouth, UK

Re: Shell and Arexx?

Postby Raziel » Fri Mar 10, 2017 7:28 pm

@tonyw
What do you want to do with the ARexx port?

The first idea was to issue a script whenever i open a new shell which would check if a shell window is already present and through the script bring the running shell to front and instead open a new "tab/shell" there rather than opening a complete new shell instance.
Just like it commonly done with internet browers.

The script could then be enhanced with whatever i need it do do

Guess there won't be a chance then
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 767
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains

Re: Shell and Arexx?

Postby tonyw » Sat Mar 11, 2017 12:12 am

I tend to open a new shell window whenever I want to start something new like that. I keep a Shell window for whatever task I'm working on (I usually have several tabs open with different current directories, but all associated with that one job).

So if I am developing, there will be a Shell with tabs for the source directory (where I am issuing commands like "make"), another tab where I issue "search" commands, another for RAM:, where I am capturing debug output from the nearby test machine, etc. There will usually be 3-5 tabs open.
If I am working on another development task at the same time, I will have a dedicated Shell window for that, again with multiple tabs. The non-working shell window(s) will usually be iconified.

There is not much more overhead involved in opening another window - just the window and its data structures. Most of the memory is used by the display for each console instance.
cheers
tony
User avatar
tonyw
AmigaOS Core Developer
AmigaOS Core Developer
 
Posts: 1248
Joined: Wed Mar 09, 2011 2:36 pm
Location: Sydney, Australia

Re: Shell and Arexx?

Postby Raziel » Sat Mar 11, 2017 8:40 am

It's not really about the overhead or memory consumption, it's more a thing of keeping everything in one place :-)

Thank you for the insight, though
If slaughterhouses had glass walls, everyone would be a vegetarian. ~ Sir Paul McCartney
-
Did everything just taste purple for a second? ~ Philip J. Fry
-
Ain't got no cash, ain't got no style, ladies vomit when I smile. ~ Dr. John Zoidberg
User avatar
Raziel
 
Posts: 767
Joined: Sat Jun 18, 2011 5:00 pm
Location: A haunted Castle somewhere in the Bavarian Mountains


Return to General AmigaOS

Who is online

Users browsing this forum: No registered users and 5 guests