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

Remove history entries



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.



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