Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH?] Re: Autocorrect for commands with a hyphen (dash) in the name
- X-seq: zsh-workers 45902
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: Re: [PATCH?] Re: Autocorrect for commands with a hyphen (dash) in the name
- Date: Sat, 23 May 2020 20:44:27 +0100
- In-reply-to: <CAH+w=7a=AB5ksiU7Tv2A3xnr2TVd=LAfQ--M0B=Vq56T_k+xyA@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAOoO2vg=-9P7v=ATOzrbh6VF35o_xzK_-yF+EA6OgTHsQBik-A@mail.gmail.com> <CAH+w=7bKpm7GO2ZhbA5Apr0sBDz5=kmX1=WK2X0nTcWxpkHPPQ@mail.gmail.com> <ab8b7655-83e8-45b2-889f-043314faea62@www.fastmail.com> <CAH+w=7aqAO37qpSvtmJXMPWq3zP=pUAZCe3i-BFyn0knRmFjVQ@mail.gmail.com> <CAH+w=7a=AB5ksiU7Tv2A3xnr2TVd=LAfQ--M0B=Vq56T_k+xyA@mail.gmail.com>
On Sat, 2020-05-23 at 12:33 -0700, Bart Schaefer wrote:
> [Moving to -workers from -users]
>
> On Tue, May 19, 2020 at 2:25 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> >
> > So, the following? Or should this also have the equivalent of
> >
> > if (*w == Tilde || *w == Equals || *w == String)
> > *x = *w;
> >
> > like zle_tricky.c?
>
> Any comment on this?
I don't think you need to put back tokens. If the spell check worked,
the result is just a normal word. If the spell check didn't work, just
leave it the way it originally was --- that may need some work but I'd
say it was a better bet than removing and re-adding tokens, which is
bound to hit some nasty cases.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author