ZLocation icon indicating copy to clipboard operation
ZLocation copied to clipboard

:bug: the second weighted path is picked

Open zhaocai opened this issue 5 years ago • 6 comments

:bug: Somehow, the second weighted path is picked.

> z -l posh

Weight Path
------ ----
   107 C:\Users\Zhao\Documents\WindowsPowerShell\Modules\oh-my-posh
    65 C:\Users\Zhao\Documents\WindowsPowerShell\Modules\posh-git
    12 C:\Users\Zhao\Documents\WindowsPowerShell\Modules\git-status-cache-posh-client
     6 C:\ProgramData\chocolatey\lib\git-status-cache-posh-client
     6 C:\ProgramData\chocolatey\lib\git-status-cache-posh-client\tools\git-status-cache-posh-client-1.0.0

> z posh ; pwd

Path
----
C:\Users\Zhao\Documents\WindowsPowerShell\Modules\posh-git

👍 However, sometimes the first weighted path is chosen as expected.

> z -l app

Weight Path
------ ----
    16 C:\tools\scoop\apps
    12 C:\Users\Zhao\AppData
     7 C:\Users\Zhao\AppData\Local\atom\app-1.9.9
     5 C:\Users\Zhao\Dropbox\Apps

 z app ; pwd

Path
----
C:\tools\scoop\apps

💡 Any idea?

zhaocai avatar Dec 28 '18 12:12 zhaocai