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

[PATCH] _du: GNU du: add -d and --inodes.



I noticed completion for du --inodes was missing, and then checked all
arguments against GNU du 8.25 and found -d as a shortcut for
--max-depth to be missing too.

Added both and the exclusions to -s.


>From 8973db494292522fc8ed95dd2ac05bc88962b28d Mon Sep 17 00:00:00 2001
From: Christian Neukirchen <chneukirchen@xxxxxxxxx>
Date: Sun, 31 Jan 2016 16:55:12 +0100
Subject: [PATCH] _du: GNU du: add -d and --inodes.

---
 Completion/Unix/Command/_du | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/Completion/Unix/Command/_du b/Completion/Unix/Command/_du
index 4065a20..e812b63 100644
--- a/Completion/Unix/Command/_du
+++ b/Completion/Unix/Command/_du
@@ -18,16 +18,17 @@ if _pick_variant gnu=Free\ Soft unix --version /dummy/no-such-file; then
     '(-l --count-links)'{-l,--count-links}'[count sizes many times if hard linked]' \
     '(-L --dereference -H -D --dereference-args -P --no-dereference)'{-L,--dereference}'[dereference all symlinks]' \
     '(-S --separate-dirs)'{-S,--separate-dirs}'[do not include size of subdirectories]' \
-    '(-s --summarize --max-depth -a --all)'{-s,--summarize}'[only report total for each argument]' \
+    '(-s --summarize --max-depth -d -a --all)'{-s,--summarize}'[only report total for each argument]' \
     '(-x --one-file-system)'{-x,--one-file-system}'[skip directories on different filesystems]' \
     '(-0 --null)'{-0,--null}'[end each output line with NUL instead of newline]' \
     \*{-X+,--exclude-from=}'[exclude files matching any pattern in file]:file:_files' \
     '*--exclude=[exclude files matching pattern]:pattern' \
-    '(-s --summarize)--max-depth=[maximum levels to recurse]:levels' \
+    '(-s --summarize -d --max-depth)'{-d+,--max-depth=}'[maximum levels to recurse]:levels' \
     '--files0-from=[use NUL-terminated list of files from file]:file:_files' \
     '--time-style=[show times using given style, +FORMAT for strftime formatted args]:style:->timestyle' \
     '--time=-[show time of last modification of any file in the directory]:property:(atime access use ctime status)' \
     '(-t --threshold)'{-t+,--threshold=}'[report only entries for which size exceeds threshold]:threshold' \
+    '--inodes[list inode usage information instead of block usage]' \
     '(* -)--help[display help information]' \
     '(* -)--version[display version information]' \
     '*:file:_files' && ret=0
-- 
2.7.0

-- 
Christian Neukirchen  <chneukirchen@xxxxxxxxx>  http://chneukirchen.org



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