diff options
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Zsh/Command/.distfiles | 1 | ||||
-rw-r--r-- | Completion/Zsh/Command/_zattr | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/Completion/Zsh/Command/.distfiles b/Completion/Zsh/Command/.distfiles index 54e1f75e9..9e8e6adc4 100644 --- a/Completion/Zsh/Command/.distfiles +++ b/Completion/Zsh/Command/.distfiles @@ -37,6 +37,7 @@ _unsetopt _vared _wait _which +_zattr _zcompile _zed _zftp diff --git a/Completion/Zsh/Command/_zattr b/Completion/Zsh/Command/_zattr new file mode 100644 index 000000000..e3836f247 --- /dev/null +++ b/Completion/Zsh/Command/_zattr @@ -0,0 +1,34 @@ +#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 + +if [[ $state = attrs ]]; then + zlistattr $line[1] REPLY + _wanted attrs expl 'attribute' compadd ${(0)REPLY} +fi |