fzy

terminal fuzzy finder picker

git clone https://9o.is/git/fzy.git

commit ea5341561a6c30a41dd31faf931e33716699e021
parent 19f196a1b8b00c01c86c47bd29e6d0ac8ca009ad
Author: John Hawthorn <john.hawthorn@gmail.com>
Date:   Tue, 15 Jul 2014 00:30:35 -0700

define SCORE_MIN -1

Diffstat:
Mmatch.c | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/match.c b/match.c @@ -3,6 +3,8 @@ #include <strings.h> #include <stdio.h> +#define SCORE_MIN -1 + static int is_subset(const char *needle, const char *haystack){ while(*needle){ if(!*haystack) @@ -76,7 +78,7 @@ double match(const char *needle, const char *haystack){ if(!*needle){ return 1.0; }else if(!is_subset(needle, haystack)){ - return -1.0; + return SCORE_MIN; }else if(!strcasecmp(needle, haystack)){ return 1.0; }else{