Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Remove history entries



On Tue, 14 Oct 2008 13:26:54 +0200
"Richard Hartmann" <richih.mailinglist@xxxxxxxxx> wrote:
> 2008/10/12 JÃrg Sommer <joerg@xxxxxxxxxxxx>:
> 
> > is it possible to remove history entries? I would like to remove commands
> > didn't exist, i.e. their exit code is 127, in the precmd function. Is
> > this possible?
> 
> Didn't PWS add a hook for this, recently? I can't find it anywhere, though.

zshaddhistory/zshaddhistory_functions: annoyingly, you can't use them for
quite this purpose.  You can veto adding history entries at the point
they're added, but that's before they're executed, so you don't have the
status.

It might be possible to force it to overwrite it, but I don't think that's
a simple change.

-- 
Peter Stephenson <pws@xxxxxxx>                  Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK                          Tel: +44 (0)1223 692070



Messages sorted by: Reverse Date, Date, Thread, Author