zsh-workers
 help / color / mirror / code / Atom feed
* Remove history entries
@ 2008-10-12 21:22 Jörg Sommer
  2008-10-13  3:41 ` Bart Schaefer
  2008-10-14 11:26 ` Richard Hartmann
  0 siblings, 2 replies; 7+ messages in thread
From: Jörg Sommer @ 2008-10-12 21:22 UTC (permalink / raw)
  To: zsh-workers

Hi,

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?

precmd()
{
    if [[ $? -eq 127 ]]
    then
        history drop -1
    fi
}

Bye, Jörg.
-- 
Was man mühelos erreichen kann, ist gewöhnlich nicht der Mühe wert,
erreicht zu werden.


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-10-14 12:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-12 21:22 Remove history entries Jörg Sommer
2008-10-13  3:41 ` Bart Schaefer
2008-10-13 22:16   ` Jörg Sommer
2008-10-14 11:26 ` Richard Hartmann
2008-10-14 11:43   ` Peter Stephenson
2008-10-14 11:48     ` Richard Hartmann
2008-10-14 12:07       ` Peter Stephenson

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).