Subject: Brace list completion errors when pre-brace word contains escaped characters
From: "Nikolay Aleksandrovich Pavlov (ZyX)" <[email-masked]>
To: Zsh hackers list <[email-masked]>
Date: Fri, 17 Jun 2016 22:19:00 +0300
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Consider the following code:

    cd /tmp
    touch foo\ bar\'baz\ test
    mkdir foo\ bar\'baz\ tset
    zsh -f
    % autoload compinit
    % compinit
    % echo foo\ bar\'baz\ t{<Tab>

This will turn last line into

    % echo foo\ bar\'baz{\ t

which is obviously not what user expects. Second `<Tab>` produces

    % echo foo\ bar\'b{az\ t

. Third

    % echo foo\ bar\{'baz\ t

. Since brace now appeared to be escaped fourth `<Tab>` does nothing.

zsh version is 5.2.