tkellogg / Jump-Location

Powershell `cd` that reads your mind
MIT License
467 stars 26 forks source link

Jump to number fails using WMF/PowerShell 5 Production Preview #61

Open LTruijens opened 9 years ago

LTruijens commented 9 years ago

Jump-Location seems to be having problems with PowerShell 5 Production Preview. It is, in some cases, unable to jump given just a number.

PS> mkdir 7\test
PS> cd 7\test
PS> cd ..\..
PS> jumpstat
Weight          Path
------          ----
57,1669311      C:\temp
9,3428682       C:\temp\7\test
PS> j 7
j : Could not find find a suitable match for search query '7' in database
At line:1 char:1
+ j 7
+ ~~~
    + CategoryInfo          : NotSpecified: (:) [Set-JumpLocation], LocationNotFoundException
    + FullyQualifiedErrorId : Jump.Location.LocationNotFoundException,Jump.Location.SetJumpLocationCommand

It does work again if the folder with the number is in the jumpstats

PS> cd 7
PS> cd ..
PS> jumpstat
Weight          Path
------          ----
57,1669311      C:\temp
9,3428682       C:\temp\7\test
1,5918183       C:\temp\7
PS> j 7
dragon788 commented 8 years ago

Does this same thing happen if you have a single character named folder with a letter or another valid filename character (ie u or x as the folder) does the matching still work or does it fail similar to this?