zsh-users
 help / color / mirror / code / Atom feed
From: Vincent Lefevre <vincent@vinc17.org>
To: zsh-users@sunsite.dk
Subject: Re: [4.0.2 bug] commands not written to history
Date: Thu, 12 Jul 2001 22:38:35 +0200	[thread overview]
Message-ID: <4a9915a18cvincent@vinc17.org> (raw)
In-Reply-To: <1010712174700.ZM271@candle.brasslantern.com>

On 12 Jul, Bart Schaefer <schaefer@candle.brasslantern.com> wrote:

> Was there more than one zsh process involved?

Yes, on the same machine of course.

> This difference could be explained by HIST_IGNORE_DUPS (which you said
> in 3981 that you do have set) if you ran the command "mail" twice in
> a row.

I have the following:

  setopt INC_APPEND_HISTORY NO_SHARE_HISTORY
  setopt EXTENDED_HISTORY
  setopt HIST_IGNORE_DUPS NO_HIST_IGNORE_ALL_DUPS
  setopt NO_HIST_ALLOW_CLOBBER HIST_REDUCE_BLANKS
  setopt HIST_IGNORE_SPACE HIST_NO_STORE HIST_NO_FUNCTIONS
  setopt HIST_BEEP

and

HISTSIZE=2000
SAVEHIST=2000
HISTFILE="$HOME2/.zhistory"

($HOME2 is my home on the local hard disk when there is one, otherwise
it has the same value as $HOME.)

>  The in-memory history gets the most recent start-time, but the
> file is not re-written unless the command text differs.  I suppose that
> could be considered a bug when EXTENDED_HISTORY is set, but there's no
> good fix except to save a duplicate in the file even though there is
> no duplicate in memory.  And I hadn't realized that INC_APPEND_HISTORY
> causes the elapsed-time to be lost from the entries, but that makes
> sense because they're written out before the command has finished.

Is there a reason? Why shouldn't they be written out after the command
finishes?

> } 116,120c116,119
> } < : 994939941:0;m $HISTFILE
> } < : 994939999:0;mail
> } < : 994940004:0;m $HISTFILE
> } < : 994940081:0;mail
> } < : 994940743:0;rem
> } ---
> } > : 994939966:13;m $HISTFILE
> } > : 994939999:2;mail
> } > : 994940004:8;m $HISTFILE
> } > : 994940743:308;rem

> There are more commands in $HISTFILE than in temphistfile, which means
> that the command was written to $HISTFILE but is not present in memory.
> That's extremely odd unless $HISTFILE was written by two or more shells
> (each using INC_APPEND_HISTORY) or unless you have one of the IGNORE_ALL
> options set (which you've previously said that you don't).  Hence my very
> first question.

Yes, there were 2 shells (using the same options). I think this is
the same one that executed the mail command, and the other one that
executed the "m $HISTFILE" command. BTW, how about writing a shell
identifier (perhaps the tty?) to the extended history?

> I'm curious about lines 113-115.  They have zero elapsed times in both
> $HISTFILE and temphisfile (otherwise they'd have showed up as a diff).
> So either those were very short commands (executed in less than 1 sec.)

Yes, this is the case (2 echo and 1 wc).

> It's a little bit odd that the start times for the first "m $HISTORY"
> commands are different as recorded in $HISTFILE and temphistfile.  Could
> be another ignore-dups thing.

Perhaps.

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/> - 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


  reply	other threads:[~2001-07-12 20:39 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-06-29 14:33 Vincent Lefevre
2001-06-29 15:50 ` Bart Schaefer
2001-06-29 18:14   ` Vincent Lefevre
2001-06-30 16:06     ` Bart Schaefer
2001-07-02 10:42       ` Vincent Lefevre
2001-07-11 22:34       ` Vincent Lefevre
2001-07-11 23:59         ` Vincent Lefevre
2001-07-12  3:30           ` Bart Schaefer
2001-07-12 12:43             ` Vincent Lefevre
2001-07-12 17:46               ` Bart Schaefer
2001-07-12 20:38                 ` Vincent Lefevre [this message]
2001-07-12 20:58                 ` Wayne Davison
2001-07-13 18:07                   ` Bart Schaefer
2001-08-07 19:46     ` Wayne Davison
2001-08-07 20:39       ` Vincent Lefevre
2001-07-21 13:44 ` Vincent Lefevre

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=4a9915a18cvincent@vinc17.org \
    --to=vincent@vinc17.org \
    --cc=zsh-users@sunsite.dk \
    /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).