Update 'venv list'.
This commit is contained in:
parent
3e3efc9650
commit
bb2f454add
@ -23,11 +23,12 @@ function venv {
|
||||
$venv)
|
||||
switch ($command) {
|
||||
"list" {
|
||||
Get-ChildItem -Directory $env:WORKON_HOME
|
||||
| ForEach-Object {
|
||||
@(Get-ChildItem -Directory $env:WORKON_HOME | ForEach-Object {
|
||||
$name = $_.Name
|
||||
$version = (& "$_/Scripts/python.exe" --version)
|
||||
Write-Output "${name}: $version"
|
||||
$version = (& "$_/Scripts/python.exe" --version).Replace("Python ", "")
|
||||
@{Name = $name; Version = $version; Path = $_ }
|
||||
}) | ForEach-Object {
|
||||
New-Object object | Add-Member -NotePropertyMembers $_ -PassThru
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user