From eeb288e6d7281a316c93b7c2144e62bfd68fc82d Mon Sep 17 00:00:00 2001 From: Frost Ming Date: Fri, 2 Apr 2021 14:30:59 +0800 Subject: [PATCH] use python to call pdm --- pdm/cli/completions/pdm.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pdm/cli/completions/pdm.zsh b/pdm/cli/completions/pdm.zsh index 2a1e5d79..91e9a266 100644 --- a/pdm/cli/completions/pdm.zsh +++ b/pdm/cli/completions/pdm.zsh @@ -1,7 +1,7 @@ #compdef pdm -PDM_PIP_INDEXES=($(command pdm config pypi.url)) PYTHON="%{python_executable}" +PDM_PIP_INDEXES=($(command ${PYTHON} -m pdm config pypi.url)) _pdm() { emulate -L zsh -o extended_glob @@ -112,7 +112,7 @@ _pdm() { '2:value:_files' && return 0 if [[ $state == keys ]]; then local l mbegin mend match keys=() - for l in ${(f)"$(command pdm config)"}; do + for l in ${(f)"$(command ${PYTHON} -m pdm config)"}; do if [[ $l == (#b)" "#(*)" = "(*) ]]; then keys+=("$match[1]:$match[2]") fi -- GitLab