about summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-27 12:02:50 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-27 12:02:50 +0000
commit0161b1ca7752c4a768dd3dcf38493290b9d36ff7 (patch)
tree33d97420437bc1f8f4657c05c7f97af5eb76173b /Completion
parent98de79a703a934d8e44d9019c006c8e8fad41005 (diff)
downloadzsh-0161b1ca7752c4a768dd3dcf38493290b9d36ff7.tar.gz
zsh-0161b1ca7752c4a768dd3dcf38493290b9d36ff7.tar.xz
zsh-0161b1ca7752c4a768dd3dcf38493290b9d36ff7.zip
zsh-workers/7515
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Base/_arguments26
-rw-r--r--Completion/Pbmplus/_pnmtotiff2
-rw-r--r--Completion/Pbmplus/_ppmtomitsu2
-rw-r--r--Completion/User/_find4
4 files changed, 30 insertions, 4 deletions
diff --git a/Completion/Base/_arguments b/Completion/Base/_arguments
index 60b07b2e4..5deef344b 100644
--- a/Completion/Base/_arguments
+++ b/Completion/Base/_arguments
@@ -533,8 +533,34 @@ else
     if [[ -z "$action" ]]; then
 
       # An empty action means that we should just display a message.
+
       _message "$descr"
       return ret
+
+    elif [[ "$action" = \(\(*\)\) ]]; then
+
+      # ((...)) contains literal strings with descriptions.
+
+      eval ws\=\( "${action[3,-3]}" \)
+
+      compadd -D ws - "${(@)ws%%:*}"
+
+      if (( $#ws )); then
+        beg=1
+        for nth in "$ws[@]"; do
+          tmp="${#nth%%:*}"
+	  [[ tmp -gt beg ]] && beg="$tmp"
+        done
+        tmp=''
+        for nth in "$ws[@]"; do
+          tmp="$tmp
+${(r:beg:: :)nth%%:*} -- ${nth#*:}"
+        done
+        tmp="$tmp[2,-1]"
+        compadd "$expl[@]" -y tmp - "${(@)ws%%:*}"
+      else
+        _message "$descr"
+      fi
     elif [[ "$action" = \(*\) ]]; then
 
       # Anything inside `(...)' is added directly.
diff --git a/Completion/Pbmplus/_pnmtotiff b/Completion/Pbmplus/_pnmtotiff
index 5cc170190..af7cb14ac 100644
--- a/Completion/Pbmplus/_pnmtotiff
+++ b/Completion/Pbmplus/_pnmtotiff
@@ -1,5 +1,5 @@
 #compdef pnmtotiff
 
 _arguments '-none' '-packbits' '-lzw' '-g3' '-g4' '-2d' '-fill' \
-           '-predictor:LZW predictor:(1 2)' '-msb2lsb' '-lsb2msb' \
+           '-predictor:LZW predictor:((1\:without\ differencing 2\:with\ differencing))' '-msb2lsb' '-lsb2msb' \
 	   '-rowsperstrip:number of rows per strip:' ':file: _pbm_file'
diff --git a/Completion/Pbmplus/_ppmtomitsu b/Completion/Pbmplus/_ppmtomitsu
index e89047df1..16103f558 100644
--- a/Completion/Pbmplus/_ppmtomitsu
+++ b/Completion/Pbmplus/_ppmtomitsu
@@ -2,6 +2,6 @@
 
 _arguments '-sharpness:sharpness:(1 2 3 4)' \
            '-enlarge:enlargement factor:(1 2 3)' \
-	   '-media:output media:(A A4 AS A4S)' \
+	   '-media:output media (default\: 1184x1350):((A\:1216x1350 A4\:1184x1452 AS\:1216x1650 A4S\:1184x1754))' \
 	   '-copy:number of copies:(1 2 3 4 5 6 7 8 9)' \
 	   '-dpi300' '-tiny' ':file: _pbm_file'
diff --git a/Completion/User/_find b/Completion/User/_find
index 368cdcb16..4fe84a83a 100644
--- a/Completion/User/_find
+++ b/Completion/User/_find
@@ -43,8 +43,8 @@ _arguments \
   '*-perm:file permission bits:' \
   '*-size:file size:' \
   '*-true' \
-  '*-type:file type:(b c d p f l s)' \
-  '*-xtype:file type:(b c d p f l s)' \
+  '*-type:file type:((b\:block\ special\ file c\:character\ special\ file d\:directory p\:named\ pipe f\:normal\ file l\:symbolic\ link s\:socket))' \
+  '*-xtype:file type:((b\:block\ special\ file c\:character\ special\ file d\:directory p\:named\ pipe f\:normal\ file l\:symbolic\ link s\:socket))' \
   '*-exec:program: _command_names -e:*\;::program arguments: _normal' \
   '*-ok:program: _command_names -e:*\;::program arguments: _normal' \
   '*-fls:output file:_files' \