zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Wayne Davison <wayne@clari.net>
Cc: zsh-workers@sunsite.auc.dk
Subject: Re: history related suggestions (plus bug reports)
Date: Thu, 17 Jun 1999 06:33:36 +0000	[thread overview]
Message-ID: <990617063336.ZM3327@candle.brasslantern.com> (raw)
In-Reply-To: <Pine.GSO.4.10.9906161347150.20632-100000@house.clari.net>

On Jun 16,  2:59pm, Wayne Davison wrote:
} Subject: Re: history related suggestions (plus bug reports)
}
} On Wed, 16 Jun 1999, Bart Schaefer wrote:
} > On Jun 15,  2:10pm, Kiddle, Oliver wrote:
} > } Subject: history related suggestions
} > }
} > } My second suggestion is that the history items imported when zsh first
} > } runs (if SAVEHIST is set) should be marked as foreign.
} > 
} > Oh, I don't like that idea at all.  Maybe I'm just funny, but a
} > lot of the time when I start a shell the first thing I do is run a
} > command searched from the history of my last session.
} 
} Do you have foreign history toggled off?

Yes.

} One thing that occurred to me was that the infer-next-history function
} should really find a line in the same local/foreign category as the
} line we just used, rather than only using local history lines.

I think that would just be confusing.  Perhaps better would be if it
searched the local or foreign history based on the state of the toggle.
However, as you point out:

} (though it can get weird if you're reading lines from more than one
} foreign shell).

} Also, I have been hesitant to have the default behavior of the history
} command display the old history lines tagged with '*'s (indicating
} they are foreign) since I figured that it was less of a compatibility
} change if this new marking only occurs if you choose to use the
} SHARE_HISTORY option.

I don't see much problem with this, because it's mostly a display thing.
(I can't think of any reason, at least not before expire-dups-first came
along, to attempt to parse the output of fc or history.)

} It would be possible to
} enhance the history-file format to save the pid of the process that
} wrote the line, and thus allow us to make history inferences using the
} next line from the same pid.  I'm not sure this is really needed,

I think it's probably overkill, and it's also not reliable.  Process IDs
are hardly unique, especially when NFS gets involved.  Maybe I'm being
strange yet again, but I prefer predictable mistakes to unpredictable,
even if the predictable ones happen a bit more often. 

} The following patch changes this to limit the size of the unique
} history commands at the start of the internal history buffer to the
} $SAVEHIST value.  This allows you to set HISTSIZE to a larger number
} than SAVEHIST, and thus get some slack space for keeping the latest
} sequences of commands.

Seems fine to me.  BTW, before this shared history thing came along, there
was never any good reason to make SAVEHSIT bigger than HISTSIZE.  Has that
changed?

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com


      reply	other threads:[~1999-06-17  7:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-15 13:10 history related suggestions Kiddle, Oliver
1999-06-15 15:27 ` Peter Stephenson
1999-06-16  8:19 ` history related suggestions (plus bug reports) Bart Schaefer
1999-06-16 20:46   ` PATCH: pws-22: history -r fix Wayne Davison
1999-06-16 21:59   ` history related suggestions (plus bug reports) Wayne Davison
1999-06-17  6:33     ` Bart Schaefer [this message]

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=990617063336.ZM3327@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=wayne@clari.net \
    --cc=zsh-workers@sunsite.auc.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).