1#compdef dchroot-dsa 2 3local expl context state line 4typeset -A opt_args 5 6_arguments -S \ 7 '(-h --help)'{-h,--help}'[help]' \ 8 '(-a --all)'{-a,--all}'[select all chroots]' \ 9 '*'{-c,--chroot=}'[use specified chroot]:chroot:->chroot' \ 10 '(-d --directory)'{-d,--directory=}'[directory to use]:dir:_files -W / -P /' \ 11 '(-l --list)'{-l,--list}'[list available chroots]' \ 12 '(-i --info)'{-i,--info}'[show information about selected chroots]' \ 13 '(-p --listpaths)'{-p,--listpaths}'[print paths to available chroots]' \ 14 '--config[dump configuration of selected chroots]' \ 15 '(-q --quiet)'{-q,--quiet}'[quiet]' \ 16 '(-v --verbose)'{-v,--verbose}'[verbose]' \ 17 '(-V --version)'{-V,--version}'[version]' \ 18 '(-):command name: _command_names -e' \ 19 '*::arguments: _normal' && return 0 20 21case "$state" in 22 (chroot) 23 _wanted tag expl 'chroot' \ 24 compadd ${(os:,:)${${${"$(dchroot -l )"#*: }// /}//[[\]]/,}} 25 ;; 26esac 27