zsh-workers
 help / color / mirror / code / Atom feed
* PATCH: _find: Update for OpenBSD
@ 2015-07-31  3:10 Matthew Martin
  2015-07-31  9:32 ` Oliver Kiddle
  0 siblings, 1 reply; 2+ messages in thread
From: Matthew Martin @ 2015-07-31  3:10 UTC (permalink / raw)
  To: zsh-workers

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' \


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: PATCH: _find: Update for OpenBSD
  2015-07-31  3:10 PATCH: _find: Update for OpenBSD Matthew Martin
@ 2015-07-31  9:32 ` Oliver Kiddle
  0 siblings, 0 replies; 2+ messages in thread
From: Oliver Kiddle @ 2015-07-31  9:32 UTC (permalink / raw)
  To: Matthew Martin; +Cc: zsh-workers

Matthew Martin wrote:
> 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.

Thanks. I've committed this with a couple of tweaks.

>    netbsd*|freebsd*|dragonfly*|darwin*|gnu)
> -    args+=( '(-H -L)-P[never follow symlinks]' )
> +    args+=(
> +      '(-H -L)-P[never follow symlinks]'
> +      '*-mount'
> +    }

Apart from the curly bracket there, I had to adjust this because
Solaris' find does accept -mount.

The other adjustments amount to noticing that some of what you changed
for OpenBSD, also apply for NetBSD. Let me know if I've made any
mistakes there.

Oliver


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-07-31  9:39 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-31  3:10 PATCH: _find: Update for OpenBSD Matthew Martin
2015-07-31  9:32 ` Oliver Kiddle

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).