1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-29 19:00:57 +02:00
zsh/Completion/Zsh/Command/_zattr
2011-09-06 16:22:08 +00:00

34 lines
569 B
Text

#compdef zgetattr zsetattr zdelattr zlistattr
local state line expl ret=1 REPLY
local -a args privs
case $service in
zgetattr)
_arguments \
'1:file:_files' \
'2:attribute:->attrs' \
'3:parameter'
;;
zsetattr)
_arguments \
'1:file:_files' \
'2:attribute:->attrs' \
'3:value'
;;
zdelattr)
_arguments \
'1:file:_files' \
'2:attribute:->attrs'
;;
zlistattr)
_arguments \
'1:file:_files' \
'2:parameter'
;;
esac && ret=0
if [[ $state = attrs ]]; then
zlistattr ${~${(Q)line[1]}} REPLY 2> /dev/null
_wanted attrs expl 'attribute' compadd $REPLY
fi