Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
imagemagick completes for all files
- X-seq: zsh-users 10757
- From: Philip <weirdofreak@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: imagemagick completes for all files
- Date: Sat, 23 Sep 2006 22:02:40 +0100
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:to:subject:message-id:mime-version:content-type:content-disposition:user-agent:from; b=QtSGPG1EVUqb1dkmMoIMlfh+4CPo7mOcD7M8uE8j/Rsgp9+/it7Kb/xPSULO7jZUEbihzsiV3BEPXMHMpTeGmnLTQjZvSk+H/WyzWH5sJoFeu4dhVGHNIE+CNv0tmFbIbFBwl2oFOpXklTCSjbYLB4C/E1qWgKWqugL3g0hixow=
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
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