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

imagemagick completes for all files



Hi,

My imagemagick completion lists all files, not just images.

I looked at .../functions/Completion/Unix/_imagemagick, and these seem
to be the relevant lines:

> formats=jpg:jpeg:tiff:miff:ras:bmp:cgm:dcx:ps:eps:fig:fits:fpx:gif:mpeg:pbm:pgm:ppm:pcd:pcl:pdf:pcx:png:rad:rgb:rgba:rle:sgi:html:shtml:tga:ttf:uil:xwd:xbm:xpm:yuv
> 
> if (( $# )); then
>   _files "$@" "$expl[@]" -g '*.(#i)(${~format//:/|})(-.)'
>   return
> fi

and in _arguments:

> '*:picture file:_imagemagick'

I assumed the _files call was causing the problem, since 'format' doesn't
exist as a variable. But changing it to 'formats' didn't help, and nor did
taking it out of the quotes or removing the tilde.

I'm not sure what the (-.) means, but removing that doesn't help either,
and it doesn't seem to change the results I get from a manual glob.

The line as I currently have it is:

> _files "$@" "$expl[@]" -g '*.(#i)('${formats//:/|}')'

I've also confirmed that changing the file does have an effect when I
start a new shell, and that the _arguments line I quoted is the one
that's controlling the completion. So right now I'm somewhat stumped;
any help would be appreciated.

I'm using v4.2.5, from gentoo's repositories.



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