[comp.sys.amiga] Sksh NewCLI query

ln63wkp@sdcc4.ucsd.edu (Viet Ho) (03/21/90)

   Is there a way to run SKSH on a new CLI window other than the
calling one?    You can't just do a run SKSH >con:blah blah.

Also, what's the correct alias sequence for closing up a window from
SKSH.   If I tried  alias qx exit;endcli it'll work but when
SKSH is first ran, it ends the CLI process and then goes into the
SKSH enviroment...kinda wierd.

                         -Viet
                         vho@ucsd.edu

koren@hpfelg.HP.COM (Steve Koren) (03/25/90)

> Is there a way to run SKSH on a new CLI window other than the
> calling one?    You can't just do a run SKSH >con:blah blah.

Yes.  Define an alias which looks like this:

  alias newsksh='$(which newshell) CON:10/60/550/200/SKsh_Window'

(You might have to adjust the size if it won't fit in your screen).  Now
when you type 'newsksh' from SKsh, you will get a new window running
SKsh.

> Also, what's the correct alias sequence for closing up a window from
> SKSH.   If I tried  alias qx exit;endcli it'll work but when
> SKSH is first ran, it ends the CLI process and then goes into the

The problem with your alias is that as soon as SKsh sees the exit statement,
it exits.  Try defining a LOGOUT variable like this:

   LOGOUT='endcli'

Now, when you exit SKsh, the calling window will go away (unless, of course,
there are other processess which are still talking to it).  You can then
exit without destroying the window by using the 'quit' alias which is
defined in the .skshinit file.

    - steve

koren@hpfelg.HP.COM (Steve Koren) (03/26/90)

> Yes.  Define an alias which looks like this:

  > alias newsksh='$(which newshell) CON:10/60/550/200/SKsh_Window'

> (You might have to adjust the size if it won't fit in your screen).  Now
> when you type 'newsksh' from SKsh, you will get a new window running
> SKsh.

Sorry, one thing I forgot here.  You have to put something like this in your
s:Shell-Startup file:

   stack 10000
   sksh

That will tll the AmigaDos shell to start SKsh when it loads.

   - steve

deven@rpi.edu (Deven T. Corzine) (03/26/90)

On 24 Mar 90 19:23:59 GMT, koren@hpfelg.HP.COM (Steve Koren) said:

> Is there a way to run SKSH on a new CLI window other than the
> calling one?    You can't just do a run SKSH >con:blah blah.

Steve> Yes.  Define an alias which looks like this:

Steve>   alias newsksh='$(which newshell) CON:10/60/550/200/SKsh_Window'

Steve> (You might have to adjust the size if it won't fit in your
Steve> screen).  Now when you type 'newsksh' from SKsh, you will get a
Steve> new window running SKsh.

This assumes your shell-startup runs SKsh.  [or, I suppose you might
be able to do "resident cli c:sksh system pure", but I haven't tried
it.]

> Also, what's the correct alias sequence for closing up a window from
> SKSH.   If I tried  alias qx exit;endcli it'll work but when
> SKSH is first ran, it ends the CLI process and then goes into the

Steve> The problem with your alias is that as soon as SKsh sees the
Steve> exit statement, it exits.  Try defining a LOGOUT variable like
Steve> this:

Steve>    LOGOUT='endcli'

Steve> Now, when you exit SKsh, the calling window will go away
Steve> (unless, of course, there are other processess which are still
Steve> talking to it).  You can then exit without destroying the
Steve> window by using the 'quit' alias which is defined in the
Steve> .skshinit file.

When I was using SKsh, I had a shell-startup (for AShell) (!) which
ran SKsh, and the next command was "endcli".  Worked fine.

Steve, might I suggest you add an option to SKsh to open a specified
device for I/O?  [i.e. con:..., aux:, etc.]

Deven
-- 
Deven T. Corzine        Internet:  deven@rpi.edu, shadow@pawl.rpi.edu
Snail:  2151 12th St. Apt. 4, Troy, NY 12180   Phone:  (518) 274-0327
Bitnet:  deven@rpitsmts, userfxb6@rpitsmts     UUCP:  uunet!rpi!deven
Simple things should be simple and complex things should be possible.