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

Re: completer for file extensions



On 28 February 2014 23:08, Oliver Kiddle <okiddle@xxxxxxxxxxx> wrote:
> Mikael Magnusson wrote:
>> This - needs to be a .. or BRACE_CCL needs to be set locally. Even
>
> Thanks. It also needs to be .. to work for a number greater than 9.
>
>> with this fix, the completer does nothing for me. I tried printing
>> both $files and $mfiles and they contain more or less the correct list
>> of extensions, but nothing shows up through the completion system.
>
> I checked and it works for me starting from zsh -f.
> If even mfiles contains a list of more than one extension then I can't
> see why the compadd would fail to add matches. Have you got any matching
> controls specified? What's your full completer list?
>
> Oliver

Okay, my problem was just that I have a stupid
command_not_found_handler that tries to autoload and execute things,
and of course that is run in a subshell so no completions were added
in the parent shell. (eg, I forgot to rm .zcompdump).

I have a number of screenshots with . in the name and it causes these
completions to be added;
.00.png     .09.16.png  .13580      .16.png     .36.04.png  .58.png
   .letter     .wav
.04.png     .09.18.png  .14.png     .18.png     .36.45.png
.6.33.config  .log
.06.png     .09.20.png  .14460      .20.png     .37.04.png  .bin
   .log.13580
.09.11.png  .11.png     .14460-1    .27.00.png  .37.06.png  .cfg
   .log.14460
.09.12.png  .12.png     .14460-2    .32.18.png  .45.png     .conf
   .png
.09.14.png  .12863-1    .16.58.png  .33.config  .49.11.png  .config
   .tar

I guess you go for the first . to get stuff like .tar.gz? Tarballs
often have . in the name for version numbers so I have the same issue
in that directory;
.0.1.zip
.0.14.tar.gz
.0.16.tar.gz
.0.17-patches-0.1.tar.bz2
.0.2.tar.bz2
.0.2.tgz
.0.21.tgz


-- 
Mikael Magnusson



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