diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 20:49:38 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-10-29 20:49:38 +0000 |
commit | 7e8b904ea45c09b97771328efb5b463e20bfc786 (patch) | |
tree | 044844ab2eb30275ba1e2e979d81a9b2628ccf8e /Completion | |
parent | 6aebb01ca74dabeff29e38e7b39db4ca33c77f31 (diff) | |
download | zsh-7e8b904ea45c09b97771328efb5b463e20bfc786.tar.gz zsh-7e8b904ea45c09b97771328efb5b463e20bfc786.tar.xz zsh-7e8b904ea45c09b97771328efb5b463e20bfc786.zip |
22803: Merge new completions onto 4.2 branch.
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Debian/Command/_dchroot | 37 | ||||
-rw-r--r-- | Completion/Debian/Command/_dchroot-dsa | 26 | ||||
-rw-r--r-- | Completion/Debian/Command/_schroot | 34 |
3 files changed, 83 insertions, 14 deletions
diff --git a/Completion/Debian/Command/_dchroot b/Completion/Debian/Command/_dchroot index 7a6973f1b..43a797d83 100644 --- a/Completion/Debian/Command/_dchroot +++ b/Completion/Debian/Command/_dchroot @@ -1,18 +1,27 @@ #compdef dchroot -local curcontext="$curcontext" state line expl ret=1 +local expl context state line +typeset -A opt_args -_arguments -C \ - '(-c -l -h -V)-a[execute in all known chroots]' \ - '(-a -l -h -V)-c[execute in specified chroot]:chroot:->chroots' \ - '(- *)-l[list available chroots]' \ - '(-l)-d[preserve environment in chroot]' \ - '(-h -l -V)-q[be quiet]' \ - '(- *)-h[display help information]' \ - '(- *)-V[display version information]' \ - '*::args: _normal' && ret=0 +_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 -[[ -n $state ]] && _wanted chroots expl chroot \ - compadd ${${$(dchroot -l)[3,-1]%,}:#\[*\]} && ret=0 - -return ret +case "$state" in + (chroot) + _wanted tag expl 'chroot' \ + compadd ${(os:,:)${${${"$(dchroot -l )"#*: }// /}//[[\]]/,}} + ;; +esac diff --git a/Completion/Debian/Command/_dchroot-dsa b/Completion/Debian/Command/_dchroot-dsa new file mode 100644 index 000000000..bed4bcf19 --- /dev/null +++ b/Completion/Debian/Command/_dchroot-dsa @@ -0,0 +1,26 @@ +#compdef dchroot-dsa + +local expl context state line +typeset -A opt_args + +_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 --listpaths)'{-p,--listpaths}'[print paths to available chroots]' \ + '--config[dump configuration of selected chroots]' \ + '(-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 tag expl 'chroot' \ + compadd ${(os:,:)${${${"$(dchroot -l )"#*: }// /}//[[\]]/,}} + ;; +esac diff --git a/Completion/Debian/Command/_schroot b/Completion/Debian/Command/_schroot new file mode 100644 index 000000000..f10236860 --- /dev/null +++ b/Completion/Debian/Command/_schroot @@ -0,0 +1,34 @@ +#compdef schroot + +local expl context state line +typeset -A opt_args + +_arguments -S \ + '(-h --help)'{-h,--help}'[help]' \ + '(-a --all)'{-a,--all}'[select all chroots and active sessions]' \ + '--all-chroots[select all chroots]' \ + '--all-sessions[select all active sessions]' \ + '*'{-c,--chroot=}'[use specified chroot]:chroot:->chroot' \ + '(-d --directory)'{-d,--directory=}'[directory to use]:dir:_files -W / -P /' \ + '(-u --user)'{-u,--user=}'[username (default current user)]:user:_users' \ + '(-l --list)'{-l,--list}'[list available chroots]' \ + '(-i --info)'{-i,--info}'[show information about selected chroots]' \ + '--location[print location of selected chroots]' \ + '--config[dump configuration of selected chroots]' \ + '(-p --preserve-environment)'{-p,--preserve-environment}'[preserve user environment]' \ + '(-q --quiet)'{-q,--quiet}'[quiet]' \ + '(-v --verbose)'{-v,--verbose}'[verbose]' \ + '(-V --version)'{-V,--version}'[version]' \ + '(-b --begin-session)'{-b,--begin-session}'[begin a session; returns a session ID]' \ + '--recover-session[recover an existing session]' \ + '(-e --end-session)'{-e,--end-session}'[end an existing session]' \ + '(-f --force)'{-f,--force}'[force operation]' \ + '(-):command name: _command_names -e' \ + '*::arguments: _normal' && return 0 + +case "$state" in + (chroot) + _wanted tag expl 'chroot' \ + compadd $(schroot -l -a) + ;; +esac |