1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-24 13:10:07 +00:00

Try to cache poetry command

This commit is contained in:
Alex Jurkiewicz 2023-10-12 13:51:42 +08:00
parent db4b650feb
commit c10e62ad29

View file

@ -4299,7 +4299,7 @@ _virtualenv_poetry() {
local idx=$1 local idx=$1
local dir=${_p9k__parent_dirs[idx]} local dir=${_p9k__parent_dirs[idx]}
local pyproject="$dir/pyproject.toml" local pyproject="$dir/pyproject.toml"
_p9k_cached_cmd 0 '' poetry -C "$dir" version _p9k_cached_cmd 0 '$pyproject' poetry -C "$dir" version
# Return the first word only, eg the value of pyproject.toml's `poetry.name` # Return the first word only, eg the value of pyproject.toml's `poetry.name`
_virtualenv_name="${_p9k__ret%% *}" _virtualenv_name="${_p9k__ret%% *}"
} }