zsh-workers
 help / color / mirror / code / Atom feed
From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: PATCH: _find: Update for OpenBSD
Date: Thu, 30 Jul 2015 22:10:02 -0500	[thread overview]
Message-ID: <20150731031002.GA21983@CptOrmolo.darkstar> (raw)

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


             reply	other threads:[~2015-07-31  3:10 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-31  3:10 Matthew Martin [this message]
2015-07-31  9:32 ` Oliver Kiddle

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20150731031002.GA21983@CptOrmolo.darkstar \
    --to=phy1729@gmail.com \
    --cc=zsh-workers@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).