tags:

views:

522

answers:

3

I run the following command unsuccessfully

dir

and I get

zsh: correct 'dir' to 'gdir' [nyae]?

What does [nyae] mean in Zsh?

+1  A: 

The n and y stand for no and yes.

I don't remember the other two offhand, they might be "always" and "exit", but the "a" may stand for abort.

You just type the corresponding initial.

zshell has a correction mechanism, so it will sometimes ask you about correcting things before doing so for you.

Uri
+9  A: 

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.

  1. If you want to execute gdir hit y (yes)
  2. If you want to try to execute dir anyway hit n (no)
  3. If you want to execute completely different spelt command like ls hit a (abort) and type your command
  4. If you want to execute a similar spelt commant like udir hit e (edit) and edit your command.
Ludwig Weinzierl
Thank you for explanations!
Masi
+2  A: 

From "An Introduction to the Z Shell"

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

Alnitak
Thank you for the link!
Masi