I was wondering if it is possible to run the clear
command automatically when I initiate a reverse search with CTRLR.
I am familiar with the precmd
function in zsh, but do not know how to limit it to a subset of commands without slowing down the sell.
One possible solution would be to add an if
condition in precmd
for detecting reverse search, although I am not sure what the condition should be for history-incremental-search-backward
.