From: Peter Stephenson <p.stephenson@samsung.com>
To: zsh-workers@zsh.org
Subject: Re: Finer control over what gets written to the history file
Date: Wed, 16 Oct 2013 09:55:24 +0100 [thread overview]
Message-ID: <20131016095524.1340a535@pwslap01u.europe.root.pri> (raw)
In-Reply-To: <131015173453.ZM2606@torch.brasslantern.com>
On Tue, 15 Oct 2013 17:34:53 -0700
Bart Schaefer <schaefer@brasslantern.com> wrote:
> On Oct 15, 5:58pm, Peter Stephenson wrote:
> } Subject: Re: Finer control over what gets written to the history file
>
> } You know about the zshaddhistory hook? Excluding by pattern is a
> } fairly easy instance of this, and it should be readily extensible for
> } various different ways of checking.
>
> Yes, but it happens at the wrong time. I don't want to prevent stuff
> from going into the history as I type it, I want to filter it out of
> the runtime history just before saving it.
>
> I.e., I want to realize 30 commands later that I really don't need the
> last 30 iterations of "Src/zsh -ec '{ /bin/cp } 2>>(sleep 1; cat -n)'"
> to be written to the history file. By that time zshaddhistory is long
> out of the picture.
We could unify the approaches and add a flag for this to histent (we've
got plenty of spare bits at the moment). So e.g. zshaddhistory could
return 2 to say "keep this internally but don't save it". I haven't
looked, but it shouldn't be too hard to combine with the HIST_FOREIGN
and HIST_TMPSTORE logic.
pws
next prev parent reply other threads:[~2013-10-16 8:55 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-15 16:41 Bart Schaefer
2013-10-15 16:58 ` Peter Stephenson
2013-10-16 0:34 ` Bart Schaefer
2013-10-16 8:55 ` Peter Stephenson [this message]
2013-10-16 9:20 ` Peter Stephenson
2013-10-17 14:20 ` Bart Schaefer
2013-10-17 14:28 ` Peter Stephenson
2013-10-16 10:04 ` Peter Stephenson
2013-10-16 5:25 ` Bart Schaefer
2013-10-16 8:35 ` Peter Stephenson
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=20131016095524.1340a535@pwslap01u.europe.root.pri \
--to=p.stephenson@samsung.com \
--cc=zsh-workers@zsh.org \
/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).