From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch] update _df
Date: Fri, 27 Apr 2018 23:30:05 -0500 [thread overview]
Message-ID: <20180428043004.GA71288@CptOrmolo.darkstar> (raw)
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
reply other threads:[~2018-04-28 4:30 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20180428043004.GA71288@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).