Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: nocorrect documentation and behavior
- X-seq: zsh-workers 52761
- From: Vincent Lefevre <vincent@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: nocorrect documentation and behavior
- Date: Fri, 15 Mar 2024 12:55:44 +0100
- Archived-at: <https://zsh.org/workers/52761>
- In-reply-to: <CAH+w=7bG+XC=jjKY8Tsw-ToJZTxdOGv8kEeyiAV4_hc9j_E4xA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- References: <20240313161732.GA3513530@cventin.lip.ens-lyon.fr> <CAH+w=7bG+XC=jjKY8Tsw-ToJZTxdOGv8kEeyiAV4_hc9j_E4xA@mail.gmail.com>
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