Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: _find: Update for OpenBSD
- X-seq: zsh-workers 35960
 
- From: Matthew Martin <phy1729@xxxxxxxxx>
 
- To: zsh-workers@xxxxxxx
 
- Subject: PATCH: _find: Update for OpenBSD
 
- Date: Thu, 30 Jul 2015 22:10:02 -0500
 
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20120113;        h=date:from:to:subject:message-id:mime-version:content-type         :content-disposition:user-agent;        bh=4AxMd4rtjRyN6BZTfzqq803OoXF9BGXVZYNr8/MCTkE=;        b=oT3Vy/6mVxCygfCge9ahhp87mwNbhUgzWrshIayCz3hxr8XVzdx0ltFtfEx0BK01l1         n/hKQo4+FruL1HkkpZB7pNnHHZt42cbkQjudM8msD/G3iyqFKpWnvpOWZ/kr8jAot9We         PksoBJP+De5Ze+bDhbdPY6z19o7aTHVVS28zRkVTDWSpN/Egk1BOJkNaLMcdKXFgUo1g         9TrUA91MceW/Fko8sa3s1XrBdgu27cYpE4dgveLH9A3xSPvmoQEqETrntoKmTGf72gn7         W/j7dv80t/jKlc1AuwVXytvMAqFD/RTrpyvP3eRrkU5b2sQHXX064t0Nc9pWmbeWZDFv         J03A==
 
- List-help: <mailto:zsh-workers-help@zsh.org>
 
- List-id: Zsh Workers List <zsh-workers.zsh.org>
 
- List-post: <mailto:zsh-workers@zsh.org>
 
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
 
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