zsh-workers
 help / color / mirror / code / Atom feed
From: P.Stephenson@swansea.ac.uk
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: [beta8] history saved on exec doesn't.
Date: Wed, 24 May 95 14:51:34 +0100	[thread overview]
Message-ID: <29967.9505241351@pyro.swan.ac.uk> (raw)
In-Reply-To: "guthrie@math.upenn.edu"'s message of "Wed, 24 May 95 07:17:25 EDT." <9505241117.AA08540@archimedes.math.upenn.edu>

guthrie@math.upenn.edu wrote:
> Mark Borges <mdb@cdc.noaa.gov> wrote:
> One other thing that is now borke is if I do any command substitution in
> the startup scripts (to set a variable say) after I have set the SAVEHIST
> and HISTFILE variables, and I don't have APPEND_HISTORY set, then this wipes
> out the history file as well.  (But I guess that this should make sense if
> exec is wiping out the history file under these same conditions.)

Actually, this is a good point and I don't think any of the clever
exec stuff should ever be done in a subshell (if forked is set in
execcmd()).  This includes the SHLVL decrement since if you're
exec'ing a command in subshell you should presumably still `see' the
level of the parent shell.  Feel free to find some weird exceptions.

*** Src/exec.c~	Tue May 23 15:36:01 1995
--- Src/exec.c	Wed May 24 14:42:44 1995
***************
*** 1448,1454 ****
  	    }
  
  	} else {
! 	    if (cmd->flags & CFLAG_EXEC) {
  		setiparam("SHLVL", --shlvl);
  		if (unset(NORCS) && interact)
  		    /* save the history file through execs */
--- 1448,1454 ----
  	    }
  
  	} else {
! 	    if ((cmd->flags & CFLAG_EXEC) && !forked) {
  		setiparam("SHLVL", --shlvl);
  		if (unset(NORCS) && interact)
  		    /* save the history file through execs */

-- 
Peter Stephenson <P.Stephenson@swansea.ac.uk>  Tel: +44 1792 205678 extn. 4461
WWW:  http://python.swan.ac.uk/~pypeters/      Fax: +44 1792 295324
Department of Physics, University of Wales, Swansea,
Singleton Park, Swansea, SA2 8PP, U.K.


  reply	other threads:[~1995-05-24 13:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-05-24 11:17 guthrie
1995-05-24 13:51 ` P.Stephenson [this message]
1995-05-24 15:42   ` Barton E. Schaefer
1995-05-24 16:55     ` P.Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=29967.9505241351@pyro.swan.ac.uk \
    --to=p.stephenson@swansea.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).