summary refs log tree commit diff
path: root/Completion
diff options
context:
space:
mode:
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Debian/Command/.distfiles6
-rw-r--r--Completion/Debian/Command/_schroot34
2 files changed, 37 insertions, 3 deletions
diff --git a/Completion/Debian/Command/.distfiles b/Completion/Debian/Command/.distfiles
index f612a518c..46d1b8906 100644
--- a/Completion/Debian/Command/.distfiles
+++ b/Completion/Debian/Command/.distfiles
@@ -8,7 +8,7 @@ _dlocate              _dpkg                 _dpkg-cross
 _dpkg_source          _dput                 _dupload              
 _linda                _lintian              _madison              
 _make-kpkg            _mergechanges         _module-assistant     
-_piuparts             _toolchain-source     _update-alternatives  
-_update-rc.d          _uscan                _wajig                
-_wanna-build          
+_piuparts             _schroot              _toolchain-source
+_update-alternatives  _update-rc.d          _uscan
+_wajig                _wanna-build          
 '
diff --git a/Completion/Debian/Command/_schroot b/Completion/Debian/Command/_schroot
new file mode 100644
index 000000000..025215be2
--- /dev/null
+++ b/Completion/Debian/Command/_schroot
@@ -0,0 +1,34 @@
+#compdef schroot
+
+local expl context state line
+typeset -A opt_args
+
+_arguments \
+       '(-h --help)'{-h,--help}'[help]' \
+       '(-a --all)'{-a,--all}'[all chroots and active sessions]' \
+       '--all-chroots' \
+       '--all-sessions' \
+       '*'{-c,--chroot=}':chroot:->chroot' \
+       '(-u --user)'{-u,--user=}':user:_users' \
+       '(-l --list)'{-l,--list}'[list available chroots]' \
+       '(-i --info)'{-i,--info}'[print detailed information about specified chroots]' \
+       '--location[print location of specified  chroots]' \
+       '--config[print configuration of specified  chroots]' \
+       '(-p --preserve-environment)'{-p,--preserve-environment}'[preserve user environment within chroot]' \
+       '(-q --quiet)'{-q,--quiet}'[quiet]' \
+       '(-v --verbose)'{-v,--verbose}'[verbose]' \
+       '(-V --version)'{-V,--version}'[version]' \
+       '(-b --begin-session)'{-b,--begin-session}'[begin a session]' \
+       '--recover-session}[recover an existing session]' \
+       '(-e --end-session)'{-e,--end-session=}':session UUID:' \
+       '(-f --force)'{-f,--force}'[force a session operation]' \
+       '(-):command name: _command_names -e' \
+       '*::arguments: _normal' && return 0
+
+case "$state" in
+	(chroot)
+	_wanted tag expl 'chroot' \
+	  compadd $(schroot -l)
+	;;
+
+esac