File: _dchroot

package info (click to toggle)
zsh 5.8-6%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 23,708 kB
  • sloc: ansic: 107,536; sh: 6,871; makefile: 726; perl: 687; awk: 389; sed: 16
file content (28 lines) | stat: -rw-r--r-- 1,127 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#compdef dchroot

local expl context state line
typeset -A opt_args
local -a _comp_priv_prefix

_arguments -S \
       '(-h --help)'{-h,--help}'[help]' \
       '(-a --all)'{-a,--all}'[select all chroots]' \
       '*'{-c,--chroot=}'[use specified chroot]:chroot:->chroot' \
       '(-d --directory)'{-d,--directory=}'[directory to use]:dir:_files -W / -P /' \
       '(-l --list)'{-l,--list}'[list available chroots]' \
       '(-i --info)'{-i,--info}'[show information about selected chroots]' \
       '(-p --path)'{-p,--path}'[print path to selected chroot]' \
       '--config[dump configuration of selected chroots]' \
       '(-d --preserve-environment)'{-d,--preserve-environment}'[preserve user environment]' \
       '(-q --quiet)'{-q,--quiet}'[quiet]' \
       '(-v --verbose)'{-v,--verbose}'[verbose]' \
       '(-V --version)'{-V,--version}'[version]' \
       '(-):command name: _command_names -e' \
       '*::arguments: _normal' && return 0

case "$state" in
  chroot)
    _wanted -C $context chroots expl 'chroot' \
	compadd ${(os:,:)${${${"$(_call_program chroots dchroot -l )"#*: }// /}//[[\]]/,}}
  ;;
esac