From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11904 invoked by alias); 16 Oct 2013 00:34:42 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31825 Received: (qmail 22349 invoked from network); 16 Oct 2013 00:34:27 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 From: Bart Schaefer Message-id: <131015173453.ZM2606@torch.brasslantern.com> Date: Tue, 15 Oct 2013 17:34:53 -0700 In-reply-to: <20131015175838.19f0256d@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Finer control over what gets written to the history file" (Oct 15, 5:58pm) References: <131015094100.ZM2399@torch.brasslantern.com> <20131015175838.19f0256d@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: Finer control over what gets written to the history file MIME-version: 1.0 Content-type: text/plain; charset=us-ascii 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 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. :-)