3 Answers
3

zsh has a powerful correction mechanism. If you type a command in the wrong way it suggests corrections.
What happend here is that dir is an unknown command and zsh suggests gdir, while maybe ls was what you wanted.

If you want to execute gdir hit y (yes)

If you want to try to execute dir anyway hit n (no)

If you want to execute completely different spelt command like ls hit a (abort) and type your command

If you want to execute a similar spelt commant like udir hit e (edit) and edit your command.

I based this answer off of Ludwig’s explanation, but wrote it in a shorter format. This format is better-suited to those who have already guessed how Z shell corrections work, and merely want to know what each option does.
–
Rory O'KaneSep 7 '12 at 21:19

If you press y when the shell asks you if you want to correct a word, it will be corrected. If you press n, it will be left alone. Pressing a aborts the command, and pressing e brings the line up for editing again, in case you agree the word is spelled wrong but you don’t like the correction.