2

There's a way to setup zsh to not save commands not found to history ?

For example, if by mistake I type:

got push

instead of

git push

then got push entry is added to history file, how to stop this ?

Victor Aurélio
  • 673
  • 1
  • 9
  • 14

1 Answers1

0

Command not found is an error. I don't think zsh differentiate this particular error with other errors, for example "missing parameter" etc.

The post might be helpful to you: Keep only successful commands in BASH history

SparedWhisle
  • 4,393