You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since I've written a script that does zshz --add $PWD for all of the source code repos I have to engage with, and set ZSHZ_MAX_SCORE=0, zshz has been better than ever.
However, it has the unfortunate side-effect of moving me to the wrong directory sometimes.
Consider the following:
$ z -l fizzbuzz
1 /Users/zachriggle/src/project/fizzbuzzservices
1 /Users/zachriggle/src/project/fizzbuzz1
1 /Users/zachriggle/src/project/fizzbuzzkext
The current code will cd into fizzbuzzkext. I think that fizzbuzz1 should win here, given that it has the most matching characters.
I expect in most cases, "the most matching characters" will end up being the shortest ${dirname:t}, so that can probably be used as a proxy.
The text was updated successfully, but these errors were encountered:
Wouldn't it be fair to say that the three examples have an equal number of matching characters, and that the one you want has the fewest extraneous characters?
“Most Matching characters” vs “Most % matching characters” is probably a
better way to say it, but yes.
On Wed, Nov 17, 2021 at 3:00 PM Alexandros Kozák ***@***.***> wrote:
it has the most matching characters.
Wouldn't it be fair to say that the three examples have an equal number of
matching characters, and that the one you want might be said to have the
fewest extraneous characters?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#56 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAA3IGBB2HMBN2NWECZRWSLUMQJWVANCNFSM5H2OBLMQ>
.
Since I've written a script that does
zshz --add $PWD
for all of the source code repos I have to engage with, and setZSHZ_MAX_SCORE=0
,zshz
has been better than ever.However, it has the unfortunate side-effect of moving me to the wrong directory sometimes.
Consider the following:
The current code will
cd
intofizzbuzzkext
. I think thatfizzbuzz1
should win here, given that it has the most matching characters.I expect in most cases, "the most matching characters" will end up being the shortest
${dirname:t}
, so that can probably be used as a proxy.The text was updated successfully, but these errors were encountered: