summaryrefslogtreecommitdiff
path: root/Completion/Unix/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix/Command')
-rw-r--r--Completion/Unix/Command/_chmod25
-rw-r--r--Completion/Unix/Command/_find2
-rw-r--r--Completion/Unix/Command/_mkdir2
3 files changed, 3 insertions, 26 deletions
diff --git a/Completion/Unix/Command/_chmod b/Completion/Unix/Command/_chmod
index 85e6df1ae..80c6f33ca 100644
--- a/Completion/Unix/Command/_chmod
+++ b/Completion/Unix/Command/_chmod
@@ -3,7 +3,7 @@
local curcontext="$curcontext" state line expl ret=1
local -a args privs
-args=( '*:file:->files' '1:mode:->mode' )
+args=( '*: :->files' '1: :_modes' )
if _pick_variant gnu=Free\ Soft unix --version; then
args+=(
@@ -45,35 +45,12 @@ else
'(1)-I[removes all inherited entries from named files ACLs]'
)
;;
- solaris*) privs=( 'l[mandatory locking]' ) ;;
esac
fi
_arguments -C -s "$args[@]" && ret=0
case "$state" in
- mode)
- compset -P \*,
- compset -S ,\*
- if [[ -prefix [0-7] ]]; then
- _message -e number 'numeric mode'
- elif compset -P '[a-z]#[+-=]'; then
- _values -S '' privilege \
- 'r[read]' 'w[write]' 'x[execute]' \
- 's[set uid/gid]' 't[sticky]' \
- 'X[execute only if directory or executable to another]' \
- "u[owner's current permissions]" \
- "g[group's current permissions]" \
- "o[other's current permissions]" \
- "$privs[@]" && ret=0
- else
- suf=( -S '' )
- compset -P '*'
- _alternative -O suf \
- 'who:who:((u\:user g\:group a\:all o\:others))' \
- 'operators:operator:(+ - =)' && ret=0
- fi
- ;;
files)
if [[ -n $opt_args[--reference] ]]; then
zmodload -F zsh/stat b:zstat 2>/dev/null
diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
index 3854d6cce..2bfb89825 100644
--- a/Completion/Unix/Command/_find
+++ b/Completion/Unix/Command/_find
@@ -139,7 +139,7 @@ _arguments -C $args \
'*-nogroup' \
'*-nouser' \
'*-ok:program: _command_names -e:*\;::program arguments: _normal' \
- '*-perm:file permission bits' \
+ '*-perm: :_modes' \
'*-print' \
'*-prune' \
'*-size:file size (blocks)' \
diff --git a/Completion/Unix/Command/_mkdir b/Completion/Unix/Command/_mkdir
index 2850b405d..830a96162 100644
--- a/Completion/Unix/Command/_mkdir
+++ b/Completion/Unix/Command/_mkdir
@@ -4,7 +4,7 @@ local curcontext="$curcontext" state line expl args variant ret=1
typeset -A opt_args
args=(
- '(-m --mode)'{-m,--mode=}'[set permission mode]:numeric mode'
+ '(-m --mode)'{-m,--mode=}'[set permission mode]: :_modes'
'(-p --parents)'{-p,--parents}'[make parent directories as needed]'
'(-)*: :->directories'
)