This commit is contained in:
Michael B 2018-06-12 16:35:36 +00:00 committed by GitHub
commit b3eade1493
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,10 +44,17 @@ _arguments -C -s -S "$args[@]" \
if [[ "$state" = modules ]]; then if [[ "$state" = modules ]]; then
local -a modules local -a modules
modules=( if ( [[ ${+python_modules} -eq 0 ]] || _cache_invalid python_modules ) \
${${=${(f)"$(_call_program modules $words[1] -c \ && ! _retrieve_cache python_modules; then
'from\ pydoc\ import\ help\;\ help\(\"modules\"\)')"}[2,-3]}:#\(package\)}
) modules=(
${${=${(f)"$(_call_program modules $words[1] -c \
'from\ pydoc\ import\ help\;\ help\(\"modules\"\)')"}[2,-3]}:#\(package\)}
)
_store_cache python_modules modules
fi
_wanted modules expl module compadd -a modules && return _wanted modules expl module compadd -a modules && return
fi fi