diff --git a/Modules/posh-venv/posh-venv.psm1 b/Modules/posh-venv/posh-venv.psm1 index 3afee1d..2d147de 100644 --- a/Modules/posh-venv/posh-venv.psm1 +++ b/Modules/posh-venv/posh-venv.psm1 @@ -23,11 +23,12 @@ function venv { $venv) switch ($command) { "list" { - Get-ChildItem -Directory $env:WORKON_HOME - | ForEach-Object { - $name = $_.Name - $version = (& "$_/Scripts/python.exe" --version) - Write-Output "${name}: $version" + @(Get-ChildItem -Directory $env:WORKON_HOME | ForEach-Object { + $name = $_.Name + $version = (& "$_/Scripts/python.exe" --version).Replace("Python ", "") + @{Name = $name; Version = $version; Path = $_ } + }) | ForEach-Object { + New-Object object | Add-Member -NotePropertyMembers $_ -PassThru } }