Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: annoying correction of directory name to non-directory name for cd
On Sep 17, 1:21am, Vincent Lefevre wrote:
}
} zsh often proposes to correct a directory name to a non-directory
} name. This is annoying.
}
} Or perhaps the correction system should take $cdpath into account.
CORRECT_ALL isn't intended to be that smart. It doesn't know or care
what the command word is, and doesn't have access to all of the syntax
analysis done by the completion system to understand what each word
position means. It doesn't know your word is a directory, EXCEPT that,
when AUTO_CD and the word is in command position, then it compares it
against cdpath if nothing else looks better.
alias cd="nocorrect cd" is always an option.
We've bandied for years about the possiblity of somehow translating the
completion system's syntax knowledge into performing correction, but
that all boils down to walking over every word in the command to call
the _correct completer on it, which isn't something that belongs in
the core shell where CORRECT_ALL sits.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author