From: Matthew Martin <phy1729@gmail.com>
To: zsh-workers@zsh.org
Subject: [patch 2/3] _chflags: Update flags
Date: Tue, 6 Sep 2016 23:00:45 -0500 [thread overview]
Message-ID: <20160907040045.ooyfvzrsrx6qzf6f@CptOrmolo.darkstar> (raw)
Also adds support for NetBSD.
Suggestions are welcome for how to describe DragonFlyBSD's cache and
noscache flags.
- Matthew Martin
diff --git a/Completion/BSD/Command/_chflags b/Completion/BSD/Command/_chflags
index 8147df0..726d0fd 100644
--- a/Completion/BSD/Command/_chflags
+++ b/Completion/BSD/Command/_chflags
@@ -15,32 +15,48 @@ addflags() {
}
addflags \
- nodump nodump \
- opaque opaque \
uappnd 'user append-only' \
uchg 'user immutable'
if (( ! EUID )); then
addflags \
arch archived \
+ nodump nodump \
sappnd 'system append-only' \
schg 'system immutable'
unset own
fi
-if [[ $OSTYPE = (freebsd|dragonfly|darwin)* ]]; then
- addflags \
- hidden hidden \
- uunlnk 'user undeletable'
+if [[ $OSTYPE = (darwin|dragonfly|freebsd|netbsd)* ]]; then
+ addflags opaque opaque
- [[ $OSTYPE = freebsd* ]] && addflags \
- offline offline \
- rdonly readonly \
- reparse 'Windows reparse point' \
- sparse 'sparse file' \
- system system
+ if [[ $OSTYPE = darwin* ]]; then
+ addflags hidden hidden
+ fi
+
+ if [[ $OSTYPE = (dragonfly|freebsd)* ]]; then
+ addlfags uunlnk 'user undeletable'
+ (( EUID )) || addflags sunlnk 'system undeletable'
+ fi
- (( EUID )) || addflags sunlnk 'system undeletable'
+ [[ $OSTYPE = dragonflybsd* ]] && {
+ addflags \
+ cache XXX \
+ nouhistory 'user nohistory'
+
+ (( EUID )) || addflags \
+ noscache XXX \
+ noshistory 'system nohistory'
+ }
+
+ [[ $OSTYPE = freebsd* ]] && addflags \
+ uarch archive \
+ uhidden hidden \
+ uoffline offline \
+ urdonly 'DOS, Windows and CIFS readonly' \
+ ureparse 'Windows reparse point' \
+ usparse 'sparse file' \
+ usystem 'DOS, Windows and CIFS system'
args=(
"-f[don't display diagnostic messages]"
reply other threads:[~2016-09-07 7:45 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=20160907040045.ooyfvzrsrx6qzf6f@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).