Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH 3/5: _imagemagick: complete all files if image files didn't match
On Wed, Aug 12, 2015 at 8:59 PM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Aug 12, 8:12pm, Mikael Magnusson wrote:
> } Subject: Re: PATCH 3/5: _imagemagick: complete all files if image files di
> }
> } > You might want to instead check your file-patterns styles to see what
> } > you've configured that broke this.
> }
> } You're right that it works in zsh -f, however, I don't have any
> } file-patterns styles set and it still doesn't work in my setup.
> }
> } This is the line that breaks the desired behaviour,
> } zstyle ':completion:*' list-dirs-first true
> }
> } Which I find to be somewhat unexpected.
>
> I'd swear a similar conversation went by on the list sometime in the
> past, but I can't find it now.
>
> } This seems to fix it, and brings the l-d-f case in line with the
> } default case below it.
>
> I don't know that I feel strongly about this one way or another, but
> according to http://www.zsh.org/mla/workers/2008/msg01119.html you are
> not supposed to get an all-files tag when using list-dirs-first.
> Instead you're always supposed to get "directories" and "other-files".
>
> So instead of
>
> pats=( " *(-/):directories:directories ${glob//:/\\:}:globbed-files" '*:all-files' )
>
> (which BTW had a stray line break in the patch you sent) it should be
> at most
>
> pats=( " *(-/):directories:directories ${glob//:/\\:}:globbed-files" '*(-^/):other-files' )
Okay, it was a very tentative patch so I just pasted it in the gmail
web interface, it usually breaks them. The line you suggested seems to
work fine for me as well. However, the duplicates from the * seem to
get filtered out by somewhere already because my listing is identical
except from the different tag for the files. I suppose if I removed
the directories tag, they would show up under the all-files tag
instead though, so this is indeed more correct.
Is the leading space in that pattern significant in any way, by the way?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author