diff options
| author | Peter Stephenson <pws@users.sourceforge.net> | 2009-03-03 15:04:15 +0000 |
|---|---|---|
| committer | Peter Stephenson <pws@users.sourceforge.net> | 2009-03-03 15:04:15 +0000 |
| commit | d58e5061ad49a3778dd1295e28810ad1f6e44cf6 (patch) | |
| tree | d05af96bd224cdc79dc5beda68faeeb8a1844b35 /Completion/Zsh | |
| parent | Jun T.: 26667: parentheses in doc causing problems (diff) | |
| download | zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar.gz zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar.bz2 zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar.lz zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar.xz zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.tar.zst zsh-d58e5061ad49a3778dd1295e28810ad1f6e44cf6.zip | |
Mikael Magnusson: 26670: add zsh/attr module
Diffstat (limited to 'Completion/Zsh')
| -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 |
