Although I love zsh, and find its spelling correction useful, it is annoying that it corrects things that obviously should not be corrected. For instance, I just executed
mv iso_ iso
and it replied
zsh: correct 'iso' to 'iso_' [nyae]?
Think about it. Correcting 'iso' to 'iso_' would mean I was trying to execute
mv iso_ iso_
which would NEVER make sense. Therefore this is really a design flaw in zsh, and should be corrected across the board. But, given that it hasn't been (at least in the version I'm using) and it isn't likely to be, is there some setting to correct it? I would prefer a non-kludgey way of fixing it. Aliases for mv
, for example, are kludgey.
Best Answer
Well, don't use the
correct_all
option if you don't like what it does.FWIW, it is NOT set by default. There's a popular configuration on the net (I won't say which) that thinks for some reason that it's a fun idea to set that option for everybody... yet, it doesn't make sense for many MANY applications, though. It makes every command line argument subject to filename spelling correction... That's insane.
To cut a long story short: Only
setopt correct
and NOTsetopt correctall
.If you need help with the spelling of filenames, zsh's completion system can help you with its
_approximate
and_correct
completers. Details can be found in thezshcompsys(1)
manual page.