Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: nocorrect documentation and behavior



On 2024-03-13 20:46:40 -0700, Bart Schaefer wrote:
> On Wed, Mar 13, 2024 at 9:17 AM Vincent Lefevre <vincent@xxxxxxxxxx> wrote:
> >   Spelling correction is not done on any of the subsequent words
> >   of the full command line. [...]
> 
> It also says "A simple command may be preceded ..." which is equally
> inaccurate in this case, but there are a lot of bits of the doc that
> colloquially assume that one interactive command line is the same as
> one "simple command".

No, this is really before a "simple command". For intance,
"nocorrect" is not valid before "for", "if", "!" or "{":

cventin% nocorrect for i in a b ; do echo $i ; done
zsh: parse error near `for'

Or is this a bug? (I do not see a reason to forbid it this case,
and IMHO, "nocorrect" should be allowed as the first word of a
complex command, the semantics being: just ignore "nocorrect",
i.e. it is only used to enable spelling correction.)

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)




Messages sorted by: Reverse Date, Date, Thread, Author