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

Excluding command from history list



Hi,

I have this problem where I'm always at the risk of hitting RET at the
wrong command during a ^R survey. Especially if you have commit access
to an important codebase,

  $ git svn dcommit

or

  $ git push -f

might be a disastrous at the wrong time. Hence, I want to exclude
*dcommit* from the history list; excluding it from the history file is
pretty simple:

  zshaddhistory () {
      [[ $1 != *dcommit* ]]
  }

... but I haven't figured out how to do it for the history list, which
is what really matters (because you're always looking for recent
history).

Thanks.

Ram



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