Can you make zsh autocorrect smarter

autocorrectionline-editorzsh

I like zsh autocorrect, but it keeps asking me about things that don't need correcting.

dzil build
zsh: correct 'build' to '.build' [nyae]? % 

.build is a directory created by the build (or any other commands that run that action so dzil .build is always wrong, and dzil build is always right. Is there any way I can communicate this to the autocorrect system?

Best Answer

Zsh's autocorrection only has limited configurability, but this should be enough for your use case. Set the CORRECT_IGNORE variable to match the strings you want to ignore in autocorrection.

CORRECT_IGNORE='.build'

(I'm assuming you aren't using correct_all. With correct_all, I think being endlessly prompted about things that don't need correcting is unavoidable.)

Related Question