Subject: Re: Completion in empty double-quotes generates error
From: Bart Schaefer <[email-masked]>
To: [email-masked]
Date: Fri, 1 Apr 2016 23:20:21 -0700
List-Id: Zsh Workers List <zsh-workers.zsh.org>

On Apr 2,  3:29am, Daniel Shahaf wrote:
}
} I could try with your patch later and report the results, but I don't
} understand how to change it for the ": 2>1" variant?

Never mind; it's not the same bug -- I just re-read 37012 and realized
I was testing incorrectly; I can still reproduce (even with 38229 in
place).

In the redirection 2>1, gotword() has concluded that the word to be
completed is "1" rather than (a prefix of) "2".  Rather than zlemetacs
moving backward to before wb, wb has moved forward to after zlemetacs.

This is probably because the lexer wants to treat "2>" as a single
token, but again the seemingly obvious thing (keep wb <= zlemetacs)
has bad side effects ("2>" is deleted, leaving "1" on the line).