1#compdef schroot 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 and active sessions]' \ 9 '--all-chroots[select all chroots]' \ 10 '--all-sessions[select all active sessions]' \ 11 '*'{-c,--chroot=}'[use specified chroot]:chroot:->chroot' \ 12 '(-d --directory)'{-d,--directory=}'[directory to use]:dir:_files -W / -P /' \ 13 '(-u --user)'{-u,--user=}'[username (default current user)]:user:_users' \ 14 '(-l --list)'{-l,--list}'[list available chroots]' \ 15 '(-i --info)'{-i,--info}'[show information about selected chroots]' \ 16 '--location[print location of selected chroots]' \ 17 '--config[dump configuration of selected chroots]' \ 18 '(-p --preserve-environment)'{-p,--preserve-environment}'[preserve user environment]' \ 19 '(-q --quiet)'{-q,--quiet}'[quiet]' \ 20 '(-v --verbose)'{-v,--verbose}'[verbose]' \ 21 '(-V --version)'{-V,--version}'[version]' \ 22 '(-b --begin-session)'{-b,--begin-session}'[begin a session; returns a session ID]' \ 23 '--recover-session[recover an existing session]' \ 24 '(-e --end-session)'{-e,--end-session}'[end an existing session]' \ 25 '(-f --force)'{-f,--force}'[force operation]' \ 26 '(-):command name: _command_names -e' \ 27 '*::arguments: _normal' && return 0 28 29case "$state" in 30 (chroot) 31 _wanted tag expl 'chroot' \ 32 compadd $(schroot -l -a) 33 ;; 34esac 35