Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: _find: Update for OpenBSD



Another patch that's been in OpenBSD's ports tree for a while. Fixed so
that it doesn't make _find OpenBSD specifc and is updated to the latest
release. Hopefully the whitespace won't get munged this time.

- Matthew Martin


diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
index aefca34..c528ad4 100644
--- a/Completion/Unix/Command/_find
+++ b/Completion/Unix/Command/_find
@@ -28,7 +28,10 @@ case $variant in
     )
   ;|
   netbsd*|freebsd*|dragonfly*|darwin*|gnu)
-    args+=( '(-H -L)-P[never follow symlinks]' )
+    args+=(
+      '(-H -L)-P[never follow symlinks]'
+      '*-mount'
+    }
   ;|
   netbsd*|freebsd*|dragonfly*|openbsd*|darwin*|gnu)
     args+=( '-d[depth first traversal]' )
@@ -44,7 +47,8 @@ case $variant in
     args+=(
       '*-anewer:file to compare (access time):_files'
       '*-cnewer:file to compare (inode change time):_files'
-      '*-mnewer:file to compare (modification time):_files'
+      '*-empty'
+      '*-execdir:program: _command_names -e:*\;::program arguments: _normal'
       '*-maxdepth:maximum search depth'
       '*-mindepth:minimum search depth'
       '*-path:path pattern to search:'
@@ -53,8 +57,6 @@ case $variant in
   freebsd*|dragonfly*|darwin*|gnu)
     args+=(
       '*-delete'
-      '*-empty'
-      '*-execdir:program: _command_names -e:*\;::program arguments: _normal'
       '*-gid:numeric group ID'
       '*-uid:numeric user ID'
       '*-noleaf'
@@ -66,6 +68,7 @@ case $variant in
       '*-wholename:full path pattern to search' \
       '*-iwholename:full path pattern to search (case insensitive)'
       '*-ignore_readdir_race'
+      '*-mnewer:file to compare (modification time):_files'
       '*-noignore_readdir_race'
       '*-okdir:program: _command_names -e:*\;::program arguments: _normal'
       '*-samefile:file to compare inode:_files' \
@@ -80,9 +83,13 @@ case $variant in
   netbsd*|freebsd*|dragonfly*|darwin*)
     args+=(
       '-E[use extended regular expressions with -regex/-iregex]'
+      '-s[traverse directories in sorted order]'
+    )
+  ;|
+  netbsd*|freebsd*|dragonfly*|openbsd*|darwin*)
+    args+=(
       '-X[warn if filename contains characters special to xargs]'
       '-f[specify file hierarchy to traverse]:path:_directories'
-      '-s[traverse directories in sorted order]'
       "-x[don't span filesystems]"
       '*-flags:flags:_chflags'
     )
@@ -128,7 +135,6 @@ _arguments -C $args \
   '*-inum:inode number:' \
   '*-links:number of links:' \
   '*-ls' \
-  '*-mount' \
   '*-mtime:modification time (days):->times' \
   '*-name:name pattern' \
   '*-newer:file to compare (modification time):_files' \



Messages sorted by: Reverse Date, Date, Thread, Author