I have an alias for
alias tdA='todo -a'
I get the following in Zsh
tdA zsh: correct 'tdA' to 'tda' [nyae]?
How can you make Zsh not to suggest a fix for an alias?
I have the spelling correction off by default.
If it works, add it to your .zshrc file.
I've been using zsh for about 18 years now, and I must say I don't like the accepted solution. Here's why:
You need to figure out the source of the problem - determine why 'tda' is being offered as a correction option. What you have done is completely disabled spelling correction globally. This denies you some very nice functionality while trying to get rid of a tactical problem. It's like wanting to kill a fly in your house by setting off some dynamite just because you're too lazy to figure out where the fly swatter is: It may get rid of the problem, but you sacrifice a whole lot in return. :)
Until you can determine your zsh's current spell correction configuration, you should consider setting the value of the special shell variable $CORRECT_IGNORE to a value of 'tda'.
Here is the entry in the zsh man page:
This should help get you by until you can determine the source of where 'tda' is actually coming from.
Also note that you can use the precommand modifier 'nocorrect' to disable spelling correction on a per-command basis. You could use this to do something a little hacky, but effective:
aliases are just tokens substituted into the command-line by zsh, and those substitutions are re-scanned for additional aliases. So the above should work.
Hopefully these alternatives give you a more selective approach to solving your problem, while still giving you the benefit of zsh's rich spelling correction features.