Open TravisGM92 opened 11 months ago
Hi, I use the built-in HISTORY_IGNORE for this:
HISTORY_IGNORE="(l|l *|ls|ls *|cd|cd ..*|cd -|z *|pwd|exit)"
In the above, the following will be ignored
ls
, ls somepath
: I did not write ls*
because I don't want to ignore all commands starting with the letters ls
l
cd
, but only for going up and backDoes that meet your expectations?
@graelo that doesn't block it from being saved into the local history, right? It just blocks it from being displayed.
Hi @TravisGM92,
With the above, the matched commands do not even make it to the history file.
I guess this is a bit stronger than what you initially had in mind.
PS: Thanks for this repo, this is sooo great
Is your feature request related to a problem? Please describe.
After a long enough time the zsh history file becomes quite bloated, and many commands in the history are ones that are run over and over, i.e.:
cd *
,ls
, etc.Describe the solution you'd like
It would be great if we could configure autosugestions to not save certain commands.
Describe alternatives you've considered
The only alternative I currently see is going in the zsh_history file and removing the specific commands.