Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Simple way to get parent process name?
- X-seq: zsh-users 1814
- From: Ken Lareau <elessar@xxxxxxxxxxxxxxxxxx>
- To: Dan Nelson <dnelson@xxxxxxxxxxxx>
- Subject: Re: Simple way to get parent process name?
- Date: Wed, 16 Sep 1998 09:09:34 -0400
- Cc: zsh-users@xxxxxxxxxxxxxxx
- In-reply-to: Your message of "Tue, 15 Sep 1998 15:13:23 CDT." <19980915151323.A5205@xxxxxxxxxxxx>
In message <19980915151323.A5205@xxxxxxxxxxxx>, 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@xxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author