Update 'venv list'.
This commit is contained in:
		| @@ -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 | ||||
|             } | ||||
|         } | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user