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: [PATCH] local history support, take 2
Date: Wed, 19 May 2004 09:58:31 -0700	[thread overview]
Message-ID: <20040519165831.GA21704@blorf.net> (raw)
In-Reply-To: <20778.1084959625@csr.com>

On Wed, May 19, 2004 at 10:40:25AM +0100, Peter Stephenson wrote:
> I might get a moment to look at this bit if you don't.

Feel free.  I had one idea on how to implement this:

The pushhiststack() function how returns the value of histsave_stack_pos
(i.e. the 1-relative spot where we stored the item).  This could be put
into a local variable named HISTPOP when `fc -p` was called for the
first time in a function.  Then, when HISTPOP got deleted, zsh would
call a new routine that would pop the list down through that value
(saving each history file on the way).

There may well be better ways to implement this than that, though (i.e.
not using the environment).

> I suspect you mean
> 
>     history -p [HISTFILE [HISTSIZE [SAVEHIST]]]

Yes, I certainly did.

When I went to document the new options, I noted that the entire
description of the "history" command is that it is the same as `fc -l'.
Because of this, I decided to switch the -p/-P options over to fc.

> I get an error if the HISTFILE on the command line doesn't exist.

Thanks -- fixed.

> Probably there should be an error if there are too many arguments

Yes, I had planned to do that, and it is now done.

You can fetch the latest patch from here:

    http://www.blorf.net/localhistory.patch

Shall I go ahead and check this in?  Or do we want to consider this a
bit more?  For instance, if you want to suggest a more pushd/popd style
command set for interactive use, let me know.

..wayne..


  reply	other threads:[~2004-05-19 16:59 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-05-11 12:17 zcalc bug 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
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 [this message]
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=20040519165831.GA21704@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).