fzy
terminal fuzzy finder picker
git clone https://9o.is/git/fzy.git
commit b6bfabc1d51fb95f37ed4688e8cd952dbf2fc8b7 parent 058e1d35e7db3334fae01e4e3a7556032d76dfef Author: John Hawthorn <john.hawthorn@gmail.com> Date: Sat, 12 Jul 2014 21:59:22 -0700 Break match ties by length of result Diffstat:
| M | fzy.c | | | 3 | ++- |
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/fzy.c b/fzy.c @@ -64,7 +64,8 @@ static int cmpchoice(const void *p1, const void *p2) { double score2 = choices_score[idx2]; if(score1 == score2) - return 0; + /* break ties by length of result */ + return strlen(choices[idx1]) - strlen(choices[idx2]); else if(score1 < score2) return 1; else