Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
[patch] update _df
- X-seq: zsh-workers 42729
- From: Matthew Martin <phy1729@xxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: [patch] update _df
- Date: Fri, 27 Apr 2018 23:30:05 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:subject:message-id:mail-followup-to:mime-version :content-disposition:user-agent; bh=o7TXAsmoJjGL6lPJDZs0yCndgqnPGwgYi+cHRzZMAdk=; b=L8eVrmbNm0hTTFZ4adxmBrHImddA2vKy7rQ/3E9TVceEZrOBqHuNnCTpJnNa+I0z6r TGr3o9faGACYJG+juMF91fQYddxgPNYNjv0s9a5bSfWv9eJbE1OW1uSD+UoBUeg18eSH tZV7bze8gjWoPEFxQbvFppbM1mpvJ6sXzKebf+5IBB+h9nx6/os3Xjym5ZKAO/zvRqVF M4by3LXNxuNKQgflp61swZ+IsZReeHy7QJJ1Yj/L5i5j0bbFglhLbqcmdcqSET52DXMi yk7SBRzkDWrluh03MQrtNkhW+hIunKEXszIE11DnXmkPJr2vxMudK2CCbXh3eq6Q/Ry/ P6sQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mail-followup-to: zsh-workers@xxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Update _df for [DFNO]BSD.
- Matthew Martin
diff --git a/Completion/Unix/Command/_df b/Completion/Unix/Command/_df
index 2586f4358..a31145cd4 100644
--- a/Completion/Unix/Command/_df
+++ b/Completion/Unix/Command/_df
@@ -28,32 +28,63 @@ if _pick_variant gnu=GNU unix --version; then
{-H,--si}'[human readable format, but use powers of 1000 not 1024]'
{-i,--inodes}'[list inode information instead of block usage]'
)
-elif [[ "$OSTYPE" == (darwin|freebsd|dragonfly)* ]]; then
+elif [[ "$OSTYPE" == (darwin|dragonfly|freebsd|netbsd*|openbsd)* ]]; then
args=(
- '(-b -g -H -h -k -m)-b[use 512-byte blocks (default)]'
- '(-b -g -H -h -k -m)-g[use 1024^3-byte blocks]'
- '(-b -g -H -h -k -m)-H[human-readable output (base 10)]'
- '(-b -g -H -h -k -m)-h[human-readable output (base 2)]'
- '(-b -g -H -h -k -m)-k[use 1024-byte blocks]'
- '(-b -g -H -h -k -m)-m[use 1024*1024-byte blocks]'
- '-P[POSIX compliant output]'
- '-a[show all mount points]'
- '-c[display a grand total]'
- '-i[include inode usage statistics (default)]'
+ '(-b -g -H -h -k -m --si)-h[human-readable output (base 2)]'
+ '(-b -g -H -h -k -m --si)-k[use 1024-byte blocks]'
+ '(-G -i -P)-P[POSIX compliant output]'
+ '(-G -i -P)-i[include inode usage statistics (default)]'
'-l[only display locally-mounted file systems]'
'-n[use previously obtained statistics]'
'*:files:_umountable'
)
spec='[only display file systems of specified types]:file system type:->fslist'
case "$OSTYPE" in
+ (darwin*|dragonfly*|freebsd*|netbsd*)
+ args+=(
+ '-a[show all mount points]'
+ '(-b -g -H -h -k -m --si)-g[use 1024^3-byte blocks]'
+ '(-b -g -H -h -k -m --si)-m[use 1024*1024-byte blocks]'
+ )
+ ;|
+ (darwin*|dragonfly*|freebsd*)
+ args+=(
+ '(-b -g -H -h -k -m --si)-b[use 512-byte blocks (default)]'
+ '(-b -g -H -h -k -m --si)-H[human-readable output (base 10)]'
+ )
+ ;|
+ (darwin*|freebsd*)
+ args+=(
+ '-c[display a grand total]'
+ )
+ ;|
(darwin*)
args+=(
"-T+$spec"
"!-t+$spec" # obsolete
)
;;
- (freebsd*|dragonfly*)
- args+=( "-t+$spec" '-T[include file system type]' )
+ (dragonfly*|freebsd*|netbsd*|openbsd*)
+ args+=(
+ "-t+$spec"
+ )
+ ;|
+ (dragonfly*|freebsd*)
+ args+=(
+ '-T[include file system type]'
+ )
+ ;|
+ (freebsd*)
+ args+=(
+ '--libxo[generate output via libxo]'
+ '(-b -g -H -h -k -m --si)--si[human-readable output (base 10)]'
+ '-,[separate thousands]'
+ )
+ ;;
+ (netbsd*)
+ args+=(
+ '(-G -i -P)-G[display all fields in statvfs]'
+ )
;;
esac
else
Messages sorted by:
Reverse Date,
Date,
Thread,
Author