Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.0 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED,
	FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,SPF_HELO_PASS autolearn=no
	autolearn_force=no version=3.4.0
X-Injected-Via-Gmane: http://gmane.org/
To: zsh-workers@zsh.org
From: Christian Neukirchen <chneukirchen@gmail.com>
Subject: [PATCH] _du: GNU du: add -d and --inodes.
Date: Sun, 31 Jan 2016 16:59:28 +0100
Lines: 46
Message-ID: <87d1shrb8f.fsf@gmail.com>
Mime-Version: 1.0
Content-Type: text/plain
X-Complaints-To: usenet@ger.gmane.org
X-Gmane-NNTP-Posting-Host: p5491fe18.dip0.t-ipconnect.de
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)
X-Seq: zsh-workers 37847


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@gmail.com>
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@gmail.com>  http://chneukirchen.org

