#compdef chown autoload -U is-at-least _chown() { typeset -A opt_args typeset -a _arguments_options local ret=1 if is-at-least 5.2; then _arguments_options=(-s -S -C) else _arguments_options=(-s -C) fi local context curcontext="$curcontext" state line _arguments "${_arguments_options[@]}" \ '(-v --verbose)-c[report only when a change is made]' \ '(-v --verbose)--changes[report only when a change is made]' \ '-v[output a diagnostic for every file processed]' \ '--verbose[output a diagnostic for every file processed]' \ '-R[operate on files and directories recursively]' \ '--recursive[operate on files and directories recursively]' \ '-H[if a command line argument is a symbolic link to a directory, traverse it]' \ '-L[traverse every symbolic link encountered in a directory]' \ '-P[do not traverse any symbolic links (default)]' \ '-s[do not cross filesystem boundaries (requires recursive)]' \ '--same-filesystem[do not cross filesystem boundaries (requires recursive)]' \ '-h[Print help]' \ '--help[Print help]' \ '-V[Print version]' \ '--version[Print version]' \ ':user:_users' \ '*::file:_files' \ && ret=0 } (( $+functions[_chown_commands] )) || _chown_commands() { local commands; commands=() _describe -t commands 'chown commands' commands "$@" } _chown "$@"