zsh-workers
 help / color / mirror / code / Atom feed
From: Wayne Davison <wayned@users.sourceforge.net>
To: Peter Stephenson <pws@csr.com>
Cc: zsh-workers@sunsite.dk
Subject: Re: zcalc bug
Date: Thu, 13 May 2004 13:03:59 -0700	[thread overview]
Message-ID: <20040513200359.GA8171@blorf.net> (raw)
In-Reply-To: <20277.1084460278@csr.com>

On Thu, May 13, 2004 at 03:57:58PM +0100, Peter Stephenson wrote:
> Wayne, have you any idea how easy it would be to implement something
> to make switching history files easy?

I'd like to see something that doesn't involve saving and restoring the
lines of the current history to a file, but instead just shunts aside
the internal data temporarily.  This would be the least disruptive,
especially since some info is lost when it gets written out and re-read
(I'm thinking of the local/imported distinction when sharing history
between multiple shells as at least one such thing that is lost).

A couple different potential idioms for surfacing this to the user come
to mind:

    pushhist; ...; pophist

    setopt localoptions tmphist

Both would do approximately the same thing internally, but I would
assume that a push/pop idiom would be expected to handle more than one
saved history at a time.  Either one would save and restore the history-
related environment variables (like HISTFILE & HISTSIZE) but (I assume)
not any of the history-related options (those a script could set locally
using the already-existing means).

It doesn't seem like it would be too hard to find all the variables that
need to be tweaked (maybe putting them into a single structure) and then
implementing something that can save and restore them under user control.

What do you think?

..wayne..


  parent reply	other threads:[~2004-05-13 20:06 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 12:17 Matthias Kopfermann
2004-05-13 14:04 ` Thomas Köhler
2004-05-13 14:57   ` Peter Stephenson
2004-05-13 15:19     ` Matthias Kopfermann
2004-05-13 15:58       ` Peter Stephenson
2004-05-13 17:29         ` Matthias Kopfermann
2004-05-13 17:47           ` Peter Stephenson
2004-05-13 18:06             ` Matthias Kopfermann
2004-05-13 20:05               ` Peter Stephenson
2004-05-13 20:03     ` Wayne Davison [this message]
2004-05-14  9:23       ` Peter Stephenson
2004-05-15  0:22         ` Wayne Davison
2004-05-18 11:28           ` Peter Stephenson
2004-05-18 19:50             ` [PATCH] local history support, take 2 Wayne Davison
2004-05-18 21:32               ` Wayne Davison
2004-05-19  9:40               ` Peter Stephenson
2004-05-19 16:58                 ` Wayne Davison
2004-05-19 21:37                   ` Peter Stephenson
2004-05-21  1:37                     ` Wayne Davison
2004-05-21  1:44                       ` Wayne Davison
2004-05-21  9:15                       ` Peter Stephenson
2004-05-21 20:06                         ` Wayne Davison

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=20040513200359.GA8171@blorf.net \
    --to=wayned@users.sourceforge.net \
    --cc=pws@csr.com \
    --cc=zsh-workers@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).