Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug#486785: tab completion broken



On Thu, 19 Jun 2008 21:15:39 +0000
Clint Adams <schizo@xxxxxxxxxx> wrote:
> Using only the following zshrc, ls /tmp/.X2<tab> results in the entire
> argument being elided (/tmp/.X* exists but /tmp/.X2* does not).
> 
> --8<--zshrc--8<--
> autoload -U compinit
> compinit
> 
> zstyle ':completion:*' completer _approximate
> 
> --8<--zshrc--8<--

It's something to do with using the -U argument to compadd when you've
got ambiguous completions: it works fine when there's only a single
completion.  It was triggered by adding the -U's to do approximation in
non-final path segments (even before the compmatch change).  The initial
"." is a red herring.  However, I don't know where it's going wrong
since when I do approximation after normal completion (but lots of other
options set, too) it works fine.  This triggers a different part of
_path_files which has compadd -U but slight differences in the other
arguments.  Internally the Cline struct that's used for generating the
command line looks a bit spartan in the failed case.  Needless to say I
haven't the faintest clue where this is leading.

pws



Messages sorted by: Reverse Date, Date, Thread, Author