about summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-04-22 12:42:20 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-04-22 12:42:20 +0000
commit1ff08b73d6c63fc8bd92e9015d28ef01def61133 (patch)
tree3dccf950ef3b0d8e4f88a0ccf933682d7969f245
parent0fed25f4616de9e97eae4478cd944e7bd7b3409b (diff)
downloadzsh-1ff08b73d6c63fc8bd92e9015d28ef01def61133.tar.gz
zsh-1ff08b73d6c63fc8bd92e9015d28ef01def61133.tar.xz
zsh-1ff08b73d6c63fc8bd92e9015d28ef01def61133.zip
correct exit code to be 0 when matches added
-rw-r--r--ChangeLog2
-rw-r--r--Completion/Unix/Command/_imagemagick41
2 files changed, 28 insertions, 15 deletions
diff --git a/ChangeLog b/ChangeLog
index 6d1fa5ea9..89123e130 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,7 @@
 2003-04-22  Oliver Kiddle  <opk@zsh.org>
 
+	* unposted: Completion/Unix/Command/_imagemagick: correct return codes
+
 	* 18458: Completion/Unix/Command/_renice: new completion for renice
 
 	* 18458: Completion/Base/Utility/_describe: handle the prefix-needed style
diff --git a/Completion/Unix/Command/_imagemagick b/Completion/Unix/Command/_imagemagick
index 2d90d6e94..fe874bd36 100644
--- a/Completion/Unix/Command/_imagemagick
+++ b/Completion/Unix/Command/_imagemagick
@@ -1,4 +1,4 @@
-#compdef display animate import montage convert combine mogrify xtp
+#compdef display animate import identify montage convert combine mogrify xtp
 
 local state line expl formats curcontext="$curcontext"
 typeset -A opt_args
@@ -73,7 +73,7 @@ display)
       '*-visual:visual to use for display:(StaticGray GrayScale StaticColor PseudoColor TrueColor DirectColor default)' \
       '*-window:window ID to display image in:_x_window' \
       '*-write:output filename:_files' \
-      '*:picture file:_imagemagick' \
+      '*:picture file:_imagemagick' && return
   ;;
 
 animate)
@@ -102,7 +102,7 @@ animate)
       '*-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' \
+      '*:picture file:_imagemagick' && return
   ;;
 
 import)
@@ -137,7 +137,7 @@ import)
       '-treedepth:color reduction tree depth:' \
       '-verbose[print image information]' \
       '-window:window ID to get:_x_window' \
-      ':output file:_files' \
+      ':output file:_files' && return
   ;;
 
 montage)
@@ -183,7 +183,7 @@ montage)
       '*-transparency:transparent color:_x_color' \
       '*-treedepth:color reduction tree depth:' \
       '*-verbose[print image information]' \
-      '*:picture file:_imagemagick' \
+      '*:picture file:_imagemagick' && return
   ;;
 
 convert)
@@ -279,14 +279,15 @@ convert)
       '-view:FlashPix viewing parameters:' \
       '-wave:sine wave parameters (<amplitude>x<wavelength>):' \
       '*:picture file:_imagemagick' && return 0
-  if [[ "$state" = profile ]]; then
-    if compset -P '*:'; then
-      _files
-    else
-      _wanted prefixes expl 'profile type' compadd icc: iptc:
+
+    if [[ "$state" = profile ]]; then
+      if compset -P '*:'; then
+	_files
+      else
+	_wanted prefixes expl 'profile type' compadd icc: iptc:
+      fi
+      return
     fi
-    return
-  fi
   ;;
 
 combine)
@@ -323,7 +324,7 @@ combine)
       ':image file:_imagemagick' \
       ':composite file:_imagemagick' \
       ':mask or combined file:_imagemagick' \
-      ':combined file:_files' \
+      ':combined file:_files' && return
   ;;
 
 mogrify)
@@ -411,7 +412,7 @@ mogrify)
       '*-verbose[print image information]' \
       '*-view:FlashPix viewing parameters:' \
       '*-wave:sine wave parameters (<amplitude>x<wavelength>):' \
-      '*:picture file:_imagemagick' \
+      '*:picture file:_imagemagick' && return
   ;;
 
 xtp)
@@ -430,9 +431,19 @@ xtp)
       '-retrieve[retrieve matching files]' \
       '-timeout:maximum timeout:' \
       '-type:remote system type:(UNIX VMS other)' \
-      ':url: _urls' \
+      ':url: _urls' && return
   ;;
 
+identify)
+  _arguments \
+      '*-density:resolution in pixels of image (<width>x<height>):' \
+      '*-depth[specify image depth]:image depth:(8 16)' \
+      '*-size:image size (<width>x<height>+<offset>):' \
+      '*-verbose[print more detailed info about image]' \
+      '*-noop[disable effect of preceding options]' \
+      '*:picture file:_imagemagick' && return
+ ;;
+
 *)
   _message 'eh?'
 esac