zsh-users
 help / color / mirror / code / Atom feed
* imagemagick completes for all files
@ 2006-09-23 21:02 Philip
  2006-09-27  9:55 ` Oliver Kiddle
  0 siblings, 1 reply; 3+ messages in thread
From: Philip @ 2006-09-23 21:02 UTC (permalink / raw)
  To: zsh-users

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.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-09-27 13:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-09-23 21:02 imagemagick completes for all files Philip
2006-09-27  9:55 ` Oliver Kiddle
2006-09-27 13:19   ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).