From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21974 invoked from network); 22 Jul 2001 00:13:59 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jul 2001 00:13:59 -0000 Received: (qmail 23910 invoked by alias); 22 Jul 2001 00:13:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15442 Received: (qmail 23899 invoked from network); 22 Jul 2001 00:13:52 -0000 X-Authentication-Warning: localhost.free.fr: lefevre set sender to vincent@vinc17.org using -f Date: Sun, 22 Jul 2001 01:43:11 +0200 From: Vincent Lefevre To: zsh-workers@sunsite.dk Cc: Vincent Lefevre Subject: Re: [4.0.2 bug] commands not written to history Message-ID: <20010722014311.A3932@ay.free.fr> Mail-Followup-To: Vincent Lefevre , zsh-workers@sunsite.dk References: <20010629163348.A9632@greux.loria.fr> <20010721154449.A1971@ay.free.fr> <1010721183220.ZM8456@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1010721183220.ZM8456@candle.brasslantern.com> User-Agent: Mutt/1.3.19i X-Mailer-Info: http://www.vinc17.org/mutt_eng.html On Sat, Jul 21, 2001 at 18:32:20 +0000, Bart Schaefer wrote: > Something that just occurred to me: You're sure that `cmd2' has run to > completion and the prompt has returned before the shell where you typed > that command exited? Yes, I'm sure that the command has exited. But is it important in my case? Commands are written to the history before they start. > Make a directory ~/zhist-debug (call it whatever you like). > > Put in your .zshrc the commands: > > date > ~/zhist-debug/startup.$$ > TRAPEXIT() { > # Order here is important! > fc -WI ~/zhist-debug/unsaved.$$ > fc -W ~/zhist-debug/complete.$$ > # This assumes you have GNU `cp' OK, no problem as I'm under Linux. > cp -p $HISTFILE ~/zhist-debug/histfile.$$ > } I've replaced cp by \cp, because I've aliased cp. > My guess is that `startx' is being inserted into $HISTFILE by your console > login shell at the time the `startx' command finishes, i.e., after all the > xterm shells have shut down. No, it isn't the case. BTW, a problem could be (but I don't think it is this problem here), because I ignore immediate dups: Shell 1: true a Shell 2: true b Shell 1: true a Shell 1: true c Though after the last "true a", "true c" has been typed immediately after it, the HISTFILE contains true a true b true c Is it possible to have immediate dups in the HISTFILE, but not in the shell history? -- Vincent Lefèvre - Web: - 100% validated HTML - Acorn Risc PC, Yellow Pig 17, Championnat International des Jeux Mathématiques et Logiques, TETRHEX, etc. Work: CR INRIA - computer arithmetic / SPACES project at LORIA