From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@zsh.org
Subject: Re: Finer control over what gets written to the history file
Date: Tue, 15 Oct 2013 17:34:53 -0700 [thread overview]
Message-ID: <131015173453.ZM2606@torch.brasslantern.com> (raw)
In-Reply-To: <20131015175838.19f0256d@pwslap01u.europe.root.pri>
On Oct 15, 5:58pm, Peter Stephenson wrote:
} Subject: Re: Finer control over what gets written to the history file
}
} On Tue, 15 Oct 2013 09:41:00 -0700
} Bart Schaefer <schaefer@brasslantern.com> wrote:
} > It'd be nice to be able to selectively exclude those from history after
} > the fact, also without having to remember to type a leading space on
} > every such line.
}
} 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.
I suppose I could have gone with a zshsavehistory hook instead, but it
seemed a lot more straightforward to copy the CORRECT_IGNORE code. :-)
next prev parent reply other threads:[~2013-10-16 0:34 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 [this message]
2013-10-16 8:55 ` Peter Stephenson
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=131015173453.ZM2606@torch.brasslantern.com \
--to=schaefer@brasslantern.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).