about summary refs log tree commit diff
path: root/Completion/User/_find
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
commit9867c4091e71e6ed69889a9bfaee07275d2fa04e (patch)
tree37318116ff90f7b90df7cb9e894790d96be0849b /Completion/User/_find
parent04979daf4f9b9645f22df1dfbb5974ab82294868 (diff)
downloadzsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.gz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.xz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.zip
manual/7448
Diffstat (limited to 'Completion/User/_find')
-rw-r--r--Completion/User/_find27
1 files changed, 16 insertions, 11 deletions
diff --git a/Completion/User/_find b/Completion/User/_find
index de8c3bff9..20e8f4ff7 100644
--- a/Completion/User/_find
+++ b/Completion/User/_find
@@ -1,27 +1,32 @@
 #compdef find
 
-local prev="$words[CURRENT-1]"
+local prev="$words[CURRENT-1]" expl
 
 if compset -N '-(ok|exec)' '\;'; then
   _normal
-elif compset -P 1 -; then
-  compadd daystart {max,min,}depth follow noleaf version xdev \
-    {a,c,}newer {a,c,m}{min,time} empty false {fs,x,}type gid inum links \
-    {i,}{l,}name {no,}{user,group} path perm regex size true uid used \
-    exec {f,}print{f,0,} ok prune ls
+elif [[ "$PREFIX" = -* ]]; then
+  _description expl option
+  compadd "$expl[@]" - -daystart -{max,min,}depth -follow -noleaf \
+    -version -xdev -{a,c,}newer -{a,c,m}{min,time} -empty -false \
+    -{fs,x,}type -gid -inum -links -{i,}{l,}name -{no,}{user,group} \
+    -path -perm -regex -size -true -uid -used -exec -{f,}print{f,0,} \
+    -ok -prune -ls
 elif [[ CURRENT -eq 2 ]]; then
   local ret=1
 
-  compgen -g '. ..' && ret=0
-  _files -g '*(-/)' && ret=0
+  _description expl directory
+  compgen "$expl[@]" -g '. ..' && ret=0
+  _files -/ && ret=0
 
   return ret
 elif [[ "$prev" = -((a|c|)newer|fprint(|0|f)) ]]; then
   _files
 elif [[ "$prev" = -fstype ]]; then
-  compadd ufs 4.2 4.3 nfs tmp mfs S51K S52K
+  _description expl 'file system type'
+  compadd "$expl[@]" ufs 4.2 4.3 nfs tmp mfs S51K S52K
 elif [[ "$prev" = -group ]]; then
-  compgen -k groups
+  _groups
 elif [[ "$prev" = -user ]]; then
-  compgen -u
+  _description expl user
+  compgen "$expl[@]" -u
 fi