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



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