"--no-isolation[do not isolate the build in a clean environment]"
"--dry-run[Show the difference only without modifying the lockfile content]"
'*:packages:_pdm_pip_packages'
)
;;
build)
arguments+=(
"--no-sdist[Don't build source tarballs]"
"--no-wheel[Don't build wheels]"
{-d+,--dest+}'[Target directory to put artifacts]:directory:_files -/'
'--no-clean[Do not clean the target directory]'
{-C,--config-setting}'[Pass options to the backend. options with a value must be specified after "=": "--config-setting=--opt(=value)" or "-C--opt(=value)"]'
"--no-isolation[do not isolate the build in a clean environment]"
compadd -X type 'hashes' 'http' 'wheels' 'metadata' && ret=0
;;
*)
_message "pattern" && ret=0
;;
esac
;;
esac
return $ret
;;
config)
_arguments -s \
{-g,--global}'[Use the global project, supply the project root with `-p` option]' \
{-l,--local}"[Set config in the project's local configuration file]" \
{-d,--delete}'[Unset a configuration key]' \
'1:key:->keys' \
'2:value:_files' && return 0
if [[ $state == keys ]]; then
local l mbegin mend match keys=()
for l in ${(f)"$(command ${PDM_PYTHON} -m pdm config)"}; do
if [[ $l == (#b)" "#(*)" = "(*) ]]; then
keys+=("$match[1]:$match[2]")
fi
done
_describe -t key "key" keys && return 0
fi
;;
export)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-f+,--format+}"[Specify the export file format]:format:(pipfile poetry flit requirements setuppy)"
"--without-hashes[Don't include artifact hashes]"
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
{-o+,--output+}"[Write output to the given file, or print to stdout if not given]:output file:_files"
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
same species]:group:_pdm_groups'
{-d,--dev}"[Select dev dependencies]"
{--prod,--production}"[Unselect dev dependencies]"
"--no-default[Don't include dependencies from the default group]"
)
;;
import)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-f+,--format+}"[Specify the file format explicitly]:format:(pipfile poetry flit requirements)"
'1:filename:_files'
)
;;
info)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
'--python[Show the interpreter path]'
'--where[Show the project root path]'
'--env[Show PEP 508 environment markers]'
'--packages[Show the packages root]'
)
;;
init)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-n,--non-interactive}"[Don't ask questions but use default values]"
)
;;
install)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
same species]:group:_pdm_groups'
{-d,--dev}"[Select dev dependencies]"
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
{--prod,--production}"[Unselect dev dependencies]"
"--no-lock[Don't do lock if lock file is not found or outdated]"
"--no-default[Don\'t include dependencies from the default group]"
'--no-editable[Install non-editable versions for all packages]'
"--no-self[Don't install the project itself]"
"--no-isolation[do not isolate the build in a clean environment]"
"--dry-run[Show the difference only without modifying the lock file content]"
"--check[Check if the lock file is up to date and fail otherwise]"
)
;;
list)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-r,--reverse}'[Reverse the dependency graph]'
'--json[Show the installed dependencies in JSON document format]'
'--graph[Display a graph of dependencies]'
"--freeze[Show the installed dependencies as pip's requirements.txt format]"
)
;;
lock)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
"--no-isolation[Do not isolate the build in a clean environment]"
"--refresh[Don't update pinned versions, only refresh the lock file]"
'--pip-args[Arguments that will be passed to pip install]:pip args:'
'*:packages:_pdm_pip_packages'
)
;;
remove)
arguments+=(
'--pip-args[Arguments that will be passed to pip uninstall]:pip args:'
{-y,--yes}'[Answer yes on the question]'
'*:packages:_pdm_pip_packages'
)
;;
*)
;;
esac
;;
esac
return $ret
;;
remove)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-G,--group}'[Specify the target dependency group to remove from]:group:_pdm_groups'
{-d,--dev}"[Remove packages from dev dependencies]"
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
"--no-sync[Only write pyproject.toml and do not uninstall packages]"
'--no-editable[Install non-editable versions for all packages]'
"--no-self[Don't install the project itself]"
"--no-isolation[do not isolate the build in a clean environment]"
"--dry-run[Show the difference only without modifying the lockfile content]"
"*:packages:_pdm_packages"
)
;;
run)
_arguments -s \
{-g,--global}'[Use the global project, supply the project root with `-p` option]' \
{-l,--list}'[Show all available scripts defined in pyproject.toml]' \
{-s,--site-packages}'[Load site-packages from the selected interpreter]' \
'(-)1:command:->command' \
'*:arguments: _normal ' && return 0
if [[ $state == command ]]; then
_command_names -e
local local_commands=($(_pdm_scripts))
_describe "local command" local_commands
return 0
fi
;;
search)
arguments+=(
'1:query string:'
)
;;
show)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
'--name[Show name]'
'--version[Show version]'
'--summary[Show summary]'
'--license[Show license]'
'--platform[Show platform]'
'--keywords[Show keywords]'
'1:package:'
)
;;
sync)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
same species]:group:_pdm_groups'
{-d,--dev}"[Select dev dependencies]"
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
{--prod,--production}"[Unselect dev dependencies]"
'--dry-run[Only prints actions without actually running them]'
"--no-default[Don\'t include dependencies from the default group]"
'--no-editable[Install non-editable versions for all packages]'
"--no-self[Don't install the project itself]"
"--no-isolation[do not isolate the build in a clean environment]"
)
;;
update)
arguments+=(
{-g,--global}'[Use the global project, supply the project root with `-p` option]'
{-G+,--group+}'[Select group of optional-dependencies or dev-dependencies(with -d). Can be supplied multiple times, use ":all" to include all groups under the
same species]:group:_pdm_groups'
{-L,--lockfile}'[Specify another lockfile path, or use `PDM_LOCKFILE` env variable. Default: pdm.lock]:lockfile:_files'
'--save-compatible[Save compatible version specifiers]'
'--save-wildcard[Save wildcard version specifiers]'
'--save-exact[Save exact version specifiers]'
'--save-minimum[Save minimum version specifiers]'
'--update-reuse[Reuse pinned versions already present in lock file if possible]'
'--update-eager[Try to update the packages and their dependencies recursively]'
'--no-editable[Install non-editable versions for all packages]'
"--no-self[Don't install the project itself]"
"--no-sync[Only update lock file but do not sync packages]"
{-u,--unconstrained}'[Ignore the version constraint of packages]'
{--pre,--prerelease}'[Allow prereleases to be pinned]'
{-d,--dev}'[Select dev dependencies]'
{--prod,--production}"[Unselect dev dependencies]"
"--no-default[Don\'t include dependencies from the default group]"
{-t,--top}'[Only update those list in pyproject.toml]'
"--dry-run[Show the difference only without modifying the lockfile content]"
"--outdated[Show the difference only without modifying the lockfile content]"
"--no-isolation[do not isolate the build in a clean environment]"
"*:packages:_pdm_packages"
)
;;
use)
arguments+=(
{-f,--first}'[Select the first matched interpreter]'
{-i,--ignore-remembered}'[Ignore the remembered selection]'