Subject: file completion(?) erases word typed
From: Daniel Shahaf <[email-masked]>
To: [email-masked]
Date: Tue, 23 Aug 2016 22:48:42 +0000
List-Id: Zsh Workers List <zsh-workers.zsh.org>

I noticed something odd in a completion function that (eventually) calls _path_files:

% git config sendemail.smtpserver <TAB><^C> # autoload
% compdef __git_sendmail_smtpserver_values f 
% f /usr/bin/gtk-update-icon-cache-3.<TAB>
% f <CURSOR>

It erased the word I'd typed. ☹

It works fine when the period hasn't been typed.  I've diffed
_complete_debug traces and saw in $_lastcomp that compstate[unambiguous]
differs between the two cases, but I'm not sure why, since the
completion is unique («/usr/bin/gtk-update-icon-cache-3*» has one
match).