#533: add tox completion
This commit is contained in:
parent
5bef032398
commit
4235fe5d69
|
@ -0,0 +1,63 @@
|
|||
#compdef tox
|
||||
# ------------------------------------------------------------------------------
|
||||
# Description
|
||||
# -----------
|
||||
#
|
||||
# Completion script for tox (https://tox.readthedocs.io).
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
# Authors
|
||||
# -------
|
||||
#
|
||||
# * Julien Nicoulaud <julien.nicoulaud@gmail.com>
|
||||
#
|
||||
# ------------------------------------------------------------------------------
|
||||
|
||||
|
||||
_arguments \
|
||||
'(- 1 *)--version[show version and exit]' \
|
||||
'(- 1 *)'{-h,--help}'[show help options]' \
|
||||
'(- 1 *)'{--hi,--help-ini}'[show help about ini-names]' \
|
||||
'*-v[increase verbosity of reporting output]' \
|
||||
'*-q[progressively silence reporting output]' \
|
||||
'(- 1 *)--showconfig[show configuration information for all environments]' \
|
||||
'(- 1 *)'{-l,--listenvs}'[show list of test environments]' \
|
||||
'(- 1 *)'{-a,--listenvs-all}'[show list of all defined environments]' \
|
||||
'-c[config file name or directory with "tox.ini" file]:config path:_files -g "*.ini"' \
|
||||
'-e[work against specified environments]: :_tox_envs_list' \
|
||||
'--notest[skip invoking test commands]' \
|
||||
'--sdistonly[only perform the sdist packaging activity]' \
|
||||
'--parallel--safe-build[ensure two tox builds can run in parallel]' \
|
||||
'--installpkg[ensure two tox builds can run in parallel]:package path:_files -/' \
|
||||
'--develop[install package in the venv using "setup.py develop"]' \
|
||||
'(-i --index-url)'{-i,--index-url}'[set indexserver url]:index server URL:_urls' \
|
||||
'--pre[install pre-releases and development versions of dependencies]' \
|
||||
'(-r --recreate)'{-r,--recreate}'[force recreation of virtual environments]' \
|
||||
'--result-json[write a json file with detailed information about all commands and results involved]:JSON file path:_files -g "*.json"' \
|
||||
'--hashseed[set PYTHONHASHSEED to SEED before running commands]:seed' \
|
||||
'*--force-dep[forces a certain version of one of the dependencies when configuring the virtual environment]:pip requirement' \
|
||||
'--sitepackages[override sitepackages setting to True in all envs]' \
|
||||
'--alwayscopy[override alwayscopy setting to True in all envs]' \
|
||||
'--skip-missing-interpreters[do not fail tests for missing interpreters]: :(config true false)' \
|
||||
'--workdir[tox working directory]: :_files -/' \
|
||||
'*:command positional substitution arguments'
|
||||
|
||||
(( $+functions[_tox_envs_list] )) ||
|
||||
_tox_envs_list() {
|
||||
compset -P '*,'; compset -S ',*'
|
||||
_wanted env-list expl 'tox env list' _tox_envs -qS,
|
||||
}
|
||||
|
||||
(( $+functions[_tox_envs] )) ||
|
||||
_tox_envs() {
|
||||
local envs; envs=($(_call_program envs $service --listenvs-all))
|
||||
_describe -t envs 'tow env' envs "$@"
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
Loading…
Reference in New Issue