From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5563 invoked from network); 16 Sep 1998 13:17:36 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 16 Sep 1998 13:17:36 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id JAA03949; Wed, 16 Sep 1998 09:10:18 -0400 (EDT) Resent-Date: Wed, 16 Sep 1998 09:06:30 -0400 (EDT) Message-Id: <199809161309.JAA06097@mailhost2.squonk.net> To: Dan Nelson cc: zsh-users@math.gatech.edu Subject: Re: Simple way to get parent process name? In-reply-to: Your message of "Tue, 15 Sep 1998 15:13:23 CDT." <19980915151323.A5205@emsphone.com> Date: Wed, 16 Sep 1998 09:09:34 -0400 From: Ken Lareau Resent-Message-ID: <"bljK51.0.lw.MVx_r"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1814 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu In message <19980915151323.A5205@emsphone.com>, Dan Nelson writes: >In the last episode (Sep 15), Ken Lareau said: >> At my current job I compile a lot of various packages, and tend to >> log my configuration, compilation and installation procedures for >> future reference, using the 'script' command. To keep myself from >> getting confused as to whether I was in a 'script' process or not, I >> would have the shell prompt change to something else while running >> 'script'. > >How about > >script () { > export INSCRIPT > (( INSCRIPT ++ )) > command script "$@" > (( INSCRIPT -- )) >} > >then when you set your prompt, test to see if $INSCRIPT is > 0. Thanks for the response; however, a more insidious problem has reared it's head: both the above and my former method (modified to zsh, of course) does not work, since the forking of a subshell doesn't reread the startup scripts when 'script' is executed. I have been unsuccessful in figuring out why this seems to happen, as the documentation I've read doesn't give a clue... anyone have any ideas on how to get around this little problem? Ken Lareau elessar@numenor.org