Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Using iex instead of ExpandString. Tested on Powershell 3.0

  • Loading branch information...
commit e15ef4417fd0266f2875462749b23660fbcf4567 1 parent 9501215
@manojlds authored
Showing with 4 additions and 2 deletions.
  1. +1 −2  posz.ps1
  2. +3 −0  zscores.csv
View
3  posz.ps1
@@ -51,8 +51,7 @@ function z ( $path, [switch] $list, [switch] $ranked, [switch] $times){
} elseif ($times){
$expression = '$([convert]::toint32($_.frequency))'
}
-
- $pathFound = $zscore | ?{ $_ -match $path } | sort -property @{Expression = "$($ExecutionContext.InvokeCommand.ExpandString($expression))" } -desc | select -first 1
+ $pathFound = $zscore | ?{ $_ -match $path } | sort -property @{Expression = "$(iex $expression)" } -desc | select -first 1
if($pathFound){
cd $pathFound.path
View
3  zscores.csv
@@ -1,2 +1,5 @@
"path","frequency","recent"
"C:\","1","1"
+"C:\Projects\oss","2","20"
+"C:\Program Files (x86)","2","20"
+"C:\projects\oss\posz","2","20"

0 comments on commit e15ef44

Please sign in to comment.
Something went wrong with that request. Please try again.