From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [128.61.1.1]) by werple.mira.net.au (8.6.10/8.6.9) with SMTP id XAA19913 for ; Wed, 24 May 1995 23:57:50 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA18395 (5.65c/Gatech-10.0-IDA for ); Wed, 24 May 1995 09:54:35 -0400 Received: by math (5.x/SMI-SVR4) id AA10657; Wed, 24 May 1995 09:52:45 -0400 Resent-Date: Wed, 24 May 95 14:51:34 +0100 Old-Return-Path: Message-Id: <29967.9505241351@pyro.swan.ac.uk> To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: [beta8] history saved on exec doesn't. In-Reply-To: "guthrie@math.upenn.edu"'s message of "Wed, 24 May 95 07:17:25 EDT." <9505241117.AA08540@archimedes.math.upenn.edu> Date: Wed, 24 May 95 14:51:34 +0100 From: P.Stephenson@swansea.ac.uk X-Mts: smtp Resent-Message-Id: <"Y7sso.0.Nc2.hepml"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/28 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu guthrie@math.upenn.edu wrote: > Mark Borges 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 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.