diff options
| author | Clint Adams <clint@users.sourceforge.net> | 2010-01-23 07:16:24 +0000 |
|---|---|---|
| committer | Clint Adams <clint@users.sourceforge.net> | 2010-01-23 07:16:24 +0000 |
| commit | b49746d827349233da6a5365b46ef9a0454c3cea (patch) | |
| tree | a9f422f23e707724803652385bf44c101c40a0ce /Completion/Unix/Command | |
| parent | users/14732: Test X:/ rather than X: in Cygwin (diff) | |
| download | zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar.gz zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar.bz2 zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar.lz zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar.xz zsh-b49746d827349233da6a5365b46ef9a0454c3cea.tar.zst zsh-b49746d827349233da6a5365b46ef9a0454c3cea.zip | |
27617: graphicsmagick completion based on _imagemagick.
Diffstat (limited to 'Completion/Unix/Command')
| -rw-r--r-- | Completion/Unix/Command/_graphicsmagick | 547 |
1 files changed, 547 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_graphicsmagick b/Completion/Unix/Command/_graphicsmagick new file mode 100644 index 000000000..03b0106a3 --- /dev/null +++ b/Completion/Unix/Command/_graphicsmagick @@ -0,0 +1,547 @@ +#compdef gm + +local state line expl formats curcontext="$curcontext" +typeset -A opt_args + +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 "$@" -g "*.(#i)(${~formats//:/|})(-.)" + return +fi + +if (( CURRENT == 2 )); then + compadd animate benchmark compare composite conjure convert display help identify import mogrify montage version + +else + +case "$words[2]" in + (display) + _arguments -M 'm:{a-z}={A-Z}' \ + '*-backdrop[use full screen]' \ + '*-background:color:_x_color' \ + '*-border:border size (<width>x<height>)' \ + '*-bordercolor:color:_x_color' \ + '*-borderwidth:geometry' \ + '*-cache[specify memory available to the pixel cache]:memory (MB)' \ + '*-colormap:colormap type:(shared private)' \ + '*-colors:preferred number of colors' \ + '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \ + '*-comment:comment string' \ + '*-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \ + '*-contrast[enhance contrast]' \ + '*+contrast[reduce contrast]' \ + '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \ + '*-debug' \ + '*-delay:delay for next image (1/100ths of a second)' \ + '*-density:image resolution (<width>x<height> in pixels)' \ + '*-despeckle[reduce speckles in image]' \ + '*-display:display:_x_display' \ + '*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \ + '*-dither[apply dithering]' \ + '*-edge:edge detection factor (0.0 - 99.9%%)' \ + '*-endian:image endianess:(MSB LSB)' \ + '*+endian' \ + '*-enhance[enhance noisy image]' \ + '*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \ + '*-flip[vertical mirror image]' \ + '*-flop[horizontal mirror image]' \ + '*-font:font:_x_font' \ + '*-foreground:color:_x_color' \ + '*-frame:border dimensions (<width>x<height>+<out>+<in>)' \ + '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \ + '(- *)-help[display help information]' \ + '*-iconGeometry:geometry:_x_geometry' \ + '*-iconic' \ + '*-immutable[disallow image modifications]' \ + '*-interlace:interlacing scheme:(None Line Plane Partition)' \ + '*-label:label string' \ + '*-magnify:factor' \ + '*-map:colormap type for display:(best default gray red green blue)' \ + '*-matte[store matte channel]' \ + '*-mattecolor:color:_x_color' \ + '*-monochrome[transform to black and white]' \ + '*-name:image name' \ + '*-negate[invert image]' \ + '*+negate[invert only grayscale]' \ + '*-noop' \ + '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \ + '*-quality:JPEG/MIFF/PNG compression level' \ + '*-raise:3-D edges (raised)' \ + '*+raise:3-D edges (lowered)' \ + '*-remote:remote command (file name):_imagemagick' \ + '*-roll:image roll offset ({+-}<x>{+-}<y>)' \ + '*-rotate:rotation (degrees{<}{>})' \ + '*-sample:scale factors (<width>x<height>)' \ + '*-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \ + '*-scenes:image scene number' \ + '*-segment:cluster pixel number' \ + '*-shared_memory' \ + '*-sharpen:sharpening factor (0.0 - 99.9%%)' \ + '*-size:image size (<width>x<height>+<offset>)' \ + '*-text_font:font:_x_font' \ + '*-texture:background texture image:_imagemagick' \ + '*-title:image title' \ + '*-treedepth:color reduction tree depth' \ + '*-trim' \ + '*-update:redisplay test time (seconds)' \ + '*-use_pixmap' \ + '*-verbose' \ + '*-visual:visual to use for display:(StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default)' \ + '*-window:window ID to display image in:_x_window' \ + '*-window_group' \ + '*-write:output filename:_files' \ + '*:picture file:_imagemagick' && return + ;; + + (animate) + _arguments -M 'm:{a-z}={A-Z}' \ + '*-backdrop[use full screen]' \ + '*-background:color:_x_color' \ + '*-bordercolor:color:_x_color' \ + '*-borderwidth:geometry' \ + '*-cache[specify memory available to the pixel cache]:memory (MB)' \ + '*-chop:<width>x<height>{+-}<x>{+-}<y>' \ + '*-colormap:colormap type:(Shared Private)' \ + '*-colors:preferred number of colors' \ + '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \ + '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>)' \ + '*-debug' \ + '*-delay:delay for next image (1/100ths of a second)' \ + '*-density:image resolution (<width>x<height> in pixels)' \ + '*-depth:image depth:(8 16)' \ + '*-display:display:_x_display' \ + '*-dither[apply dithering]' \ + '*-font:font:_x_font' \ + '*-foreground:color:_x_color' \ + '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \ + '(- *)-help[display help information]' \ + '*-iconGeometry:geometry:_x_geometry' \ + '*-iconic' \ + '*-interlace:interlacing scheme:(None Line Plane Partition)' \ + '*-map:colormap type for display:(best default gray red green blue)' \ + '*-matte[store matte channel]' \ + '*-mattecolor:color:_x_color' \ + '*-monochrome[transform to black and white]' \ + '*-name:image name' \ + '*-noop' \ + '*-pause:delay (seconds)' \ + '*-remote:remote command (file name):_imagemagick' \ + '*-rotate:rotation (degrees{<}{>})' \ + '*-scenes:image scene number' \ + '*-shared_memory' \ + '*-size:image size (<width>x<height>+<offset>)' \ + '*-text_font:font:_x_font' \ + '*-title:image title' \ + '*-treedepth:color reduction tree depth' \ + '*-trim' \ + '*-verbose[print image information]' \ + '*-visual:visual to use for display:(StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default)' \ + '*-window:window ID to display image in:_x_window' \ + '*:picture file:_imagemagick' && return + ;; + + (import) + _x_arguments -M 'm:{a-z}={A-Z}' \ + '-adjoin[join images]' \ + '-border:border size (<width>x<height>):' \ + '-bordercolor:color:_x_color' \ + '-cache[specify memory available to the pixel cache]:memory (MB)' \ + '-colors:preferred number of colors' \ + '-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \ + '-comment:comment string' \ + '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \ + '-debug' \ + '-delay:delay for next image (1/100ths of a second)' \ + '-density:resolution in pixels of image (<width>x<height>)' \ + '-depth:image depth:(8 16)' \ + '-descend[descend window hierarchy]' \ + '-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \ + '-dither[apply dithering]' \ + '(+endian)-endian:image endianess:(MSB LSB)' \ + '(-endian)+endian' \ + '-frame[include window manager frame]' \ + '(- *)-help[display help information]' \ + '-interlace:interlacing scheme:(None Line Plane Partition)' \ + '-label:label string' \ + '-monochrome[transform to black and white]' \ + '-negate[invert image]' \ + '+negate[invert only grayscale]' \ + '-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \ + '-pause:delay (seconds)' \ + '-ping' \ + '-pointsize:Postscript font size' \ + '-quality:JPEG/MIFF/PNG compression level' \ + '-resize:size (<width>x<height>{%%}{@}{!}{<}{>})' \ + '-rotate:rotation (degrees{<}{>})' \ + '-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \ + '-scene:number of screen snapshots' \ + '-screen[get root window]' \ + '-silent[be quiet]' \ + '-snaps:number' \ + '-transparent:transparent color:_x_color' \ + '-treedepth:color reduction tree depth' \ + '-trim' \ + '-type:image type:(Bilevel Grayscale Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte Optimize)' \ + '-verbose[print image information]' \ + '-window:window ID to get:_x_window' \ + ':output file:_files' && return + ;; + + (montage) + _arguments -M 'm:{a-z}={A-Z}' \ + '*-adjoin[join images]' \ + '*-background:color:_x_color' \ + '*-blur:blur factor (0.0 - 99.9%%)' \ + '*-bordercolor:color:_x_color' \ + '*-borderwidth:geometry' \ + '*-cache[specify memory available to the pixel cache]:memory (MB)' \ + '*-colors:preferred number of colors' \ + '*-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \ + '*-comment:comment string' \ + '*-compose:image composition type:(Over In Out Atop Xor Plus Minus Add Subtract Difference Bumpmap Replace ReplaceRed ReplaceGreen ReplaceBlue ReplaceMatte)' \ + '*-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \ + '*-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \ + '*-debug' \ + '*-density:resolution in pixels of image (<width>x<height>)' \ + '*-depth:image depth:(8 16)' \ + '*-display:display:_x_display' \ + '*-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \ + '*-dither[apply dithering]' \ + '*+dither[render Postscript without aliasing]' \ + '*-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \ + '*-endian:image endianess:(MSB LSB)' \ + '*+endian' \ + '*-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \ + '*-frame[draw frame around image]' \ + '*-font:annotation font:_x_font' \ + '*-gamma[gamma correction level]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*+gamma[gamma correction level (don'\''t change pixels)]:gamma correction level (<n> or <red>/<green>/<blue>)' \ + '*-geometry:window geometry (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>})' \ + '*-gravity:image gravity:(Center North NorthEast East SouthEast South SouthWest West NorthWest)' \ + '(- *)-help[display help information]' \ + '*-interlace:interlacing scheme:(None Line Plane Partition)' \ + '*-label:label string' \ + '*-matte[store matte channel]' \ + '*-mattecolor:color:_x_color' \ + '*-mode:montage type:(Frame Unframe Concatenate)' \ + '*-monochrome[transform to black and white]' \ + '*-noop' \ + '*-page:geometry of image canvas (<width>x<height>{+-}<x>{+-}<y>{%%}{!}{<}{>}):(11x17 Ledger Legal Letter LetterSmall ArchE ArchD ArchC ArchB ArchA A0 A1 A2 A3 A4 A4Small A5 A6 A7 A8 A9 A10 B0 B1 B2 B3 B4 B5 C0 C1 C2 C3 C4 C5 C6 Flsa Flse HalfLetter)' \ + '*-pen:font color:_x_color' \ + '*-pointsize:Postscript font size' \ + '*-quality:JPEG/MIFF/PNG compression level' \ + '*-resize:size (<width>x<height>{%%}{@}{!}{<}{>})' \ + '*-rotate:rotation (degrees{<}{>})' \ + '*-sampling_factor:sampling factor (<horizontal_factor>x<vertical_factor>)' \ + '*-scenes:image scene number' \ + '*-shadow[add shadow]' \ + '*-sharpen:sharpening factor (0.0 - 99.9%%)' \ + '*-size:image size (<width>x<height>+<offset>)' \ + '*-stroke:color:_x_color' \ + '*-texture:background texture image:_imagemagick' \ + '*-tile:number of tiles (<width>x<height>)' \ + '*-title:image title' \ + '*-transparent:transparent color:_x_color' \ + '*-treedepth:color reduction tree depth' \ + '*-trim' \ + '*-type:image type:(Bilevel Grayscale Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationMatte Optimize)' \ + '*-verbose[print image information]' \ + '*:picture file:_imagemagick' && return + ;; + + (convert) + _arguments -C -M 'm:{a-z}={A-Z}' \ + '-adjoin[join images]' \ + '-affine[drawing transform matrix]:matrix' \ + '-antialias[remove pixel aliasing]' \ + '-append[append image sequence]' \ + '-average[average image sequence]' \ + '-background[specify background color]:color:_x_color' \ + '-blur:blur factor (0.0 - 99.9%%)' \ + '-border:border size (<width>x<height>)' \ + '-bordercolor:border color:_x_color' \ + '-box:annotation bounding box color:_x_color' \ + '-cache[specify memory available to the pixel cache]:memory (MB)' \ + '-channel:channel:(Red Green Blue Opacity Cyan Magenta Yellow Black)' \ + '-charcoal:charcoal drawing factor' \ + '-chop:<width>x<height>{+-}<x>{+-}<y>' \ + '-clip' \ + '-coalesce[merge image sequence]' \ + '-colorize:colorization amount (<num> or <red>/<green>/<blue>)' \ + '-colors:preferred number of colors' \ + '-colorspace:colorspace type:(GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr YUV CMYK)' \ + '-comment:comment string' \ + '-compress:image compression type:(None BZip Fax Group4 JPEG LZW RunlengthEncoded Zip)' \ + '-contrast[enhance contrast]' \ + '+contrast[reduce contrast]' \ + '-crop:crop image (<width>x<height>{+-}<x>{+-}<y>{%%})' \ + '-cycle:image colormap shift' \ + '-debug' \ + '-deconstruct[break down image sequence into parts]' \ + '-delay:delay for next image (1/100ths of a second)' \ + '-density:resolution in pixels of image (<width>x<height>)' \ + '-depth:image depth:(8 16)' \ + '-despeckle[reduce speckles in image]' \ + '-display:display:_x_display' \ + '-dispose:GIF disposal method:((0:no\ disposal 1\:don'\''t\ dispose\ between\ frames 2\:overwrite\ frame\ with\ background\ color 3\:overwrite\ with\ previous\ frame))' \ + '-dither[apply dithering]' \ + '-draw:drawing primitive:compadd -S "\\ " - rectangle circle ellipse polygon color matte text image' \ + '-edge:edge detection factor (0.0 - 99.9%%)' \ + '-emboss[emboss image]' \ + '(+endian)-endian:image endianess:(MSB LSB)' \ + '(-endian)+endian' \ + '-enhance[enhance image]' \ + '-equalize[histogram equalization]' \ + '-fill[specify color to use when filling a graphic primitive]:color:_x_color' \ + '-filter:filter type for resizing:(Point Box Triangle Hermite Hanning Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos Bessel Sinc)' \ + '-flatten[flatten a sequence of images]' \ |
