Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion themes/developer/developer.theme.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,21 @@ function _omb_theme_developer__read_ruby_version {
## @var[out] REPLY
function _omb_theme_developer__readPyVersion {
local val_py=$(python --version 2>/dev/null | cut -d ' ' -f 2)

if _omb_util_command_exists conda; then
local condav=$(conda env list | awk '$2 == "*" {print $1}')
val_py="conda<$condav> $val_py"
elif _omb_util_command_exists uv; then
local val_uv=$(uv --version 2>/dev/null | cut -d ' ' -f 2)
local val_venv=""
## according some docs this env var just exist when a venv/uv venv is active
if [[ $VIRTUAL_ENV =~ [^/]+/[^/]+$ ]]; then
val_venv=" ($BASH_REMATCH)"
fi

val_py="uv($val_uv) $val_py$val_venv"
else
# Si nvm no está instalado, utilizar "njs"
# if conda and uv is not installed use "py"
val_py="py $val_py"
fi
REPLY=$val_py
Expand Down
Loading