summary refs log tree commit diff
path: root/Completion/BSD/Type/_flags
diff options
context:
space:
mode:
authordana <dana@dana.is>2018-01-03 18:14:05 -0600
committerOliver Kiddle <opk@zsh.org>2018-01-04 11:50:50 +0100
commit21a09a14181851e931f9b2b65704044eed169fb7 (patch)
tree5f586e42fa22381ec3302ed27ee77d6ff18f8fbc /Completion/BSD/Type/_flags
parentc789efbaf0db016256d58c685c5586d7a684170d (diff)
downloadzsh-21a09a14181851e931f9b2b65704044eed169fb7.tar.gz
zsh-21a09a14181851e931f9b2b65704044eed169fb7.tar.xz
zsh-21a09a14181851e931f9b2b65704044eed169fb7.zip
42214: use less general names on new functions for completing file flags and modes
Diffstat (limited to 'Completion/BSD/Type/_flags')
-rw-r--r--Completion/BSD/Type/_flags70
1 files changed, 0 insertions, 70 deletions
diff --git a/Completion/BSD/Type/_flags b/Completion/BSD/Type/_flags
deleted file mode 100644
index 95044121c..000000000
--- a/Completion/BSD/Type/_flags
+++ /dev/null
@@ -1,70 +0,0 @@
-#autoload
-
-# Provides completion for file flags (formerly part of _chflags)
-
-local curcontext=$curcontext su=$(( ! EUID || $+_comp_priv_prefix ))
-local -a context line state state_descr copts=( "${@}" ) flags flag_descs
-local -A val_args
-
-flag_descs+=(
-  uappnd 'user append-only'
-  uchg 'user immutable'
-)
-
-if (( su )); then
-  flag_descs+=(
-    arch archived
-    nodump nodump
-    sappnd 'system append-only'
-    schg 'system immutable'
-  )
-fi
-
-if [[ $OSTYPE = (darwin|dragonfly|freebsd|netbsd)* ]]; then
-  flag_descs+=(opaque opaque)
-
-  if [[ $OSTYPE = darwin* ]]; then
-    flag_descs+=(hidden hidden)
-  fi
-
-  if [[ $OSTYPE = (dragonfly|freebsd)* ]]; then
-    flag_descs+=(uunlnk 'user undeletable')
-
-    (( su )) &&
-    flag_descs+=(sunlnk 'system undeletable')
-  fi
-
-  if [[ $OSTYPE = dragonfly* ]]; then
-    flag_descs+=(
-      cache XXX
-      nouhistory 'user nohistory'
-    )
-
-    (( su )) && flag_descs+=(
-      noscache XXX
-      noshistory 'system nohistory'
-    )
-  fi
-
-  [[ $OSTYPE = freebsd* ]] && flag_descs+=(
-    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'
-  )
-fi
-
-for 1 2 in $flag_descs; do
-  if [[ $1 = no* ]]; then
-    flags+=("(${1#no})$1[set the $2 flag]"
-             "($1)${1#no}[unset the $2 flag]")
-  else
-    flags+=("(no$1)$1[set the $2 flag]"
-             "($1)no$1[unset the $2 flag]")
-  fi
-done
-
-_values -O copts -s , 'file flags' $flags