fzy

terminal fuzzy finder picker

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

commit 4168598a50f47d3e47e31dd84ffa765a219fac75
parent 422519b314fa7e806a00f9e9595ae3ef5c8ffbad
Author: John Hawthorn <john.hawthorn@gmail.com>
Date:   Tue, 16 Sep 2014 19:20:39 -0700

Allow specifying max for limit

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

diff --git a/fzy.c b/fzy.c @@ -4,6 +4,7 @@ #include <stdlib.h> #include <ctype.h> #include <getopt.h> +#include <limits.h> #include "match.h" #include "tty.h" @@ -222,7 +223,9 @@ int main(int argc, char *argv[]){ case 'l': { int l; - if(sscanf(optarg, "%d", &l) != 1 || l < 3){ + if(!strcmp(optarg, "max")){ + l = INT_MAX; + }else if(sscanf(optarg, "%d", &l) != 1 || l < 3){ fprintf(stderr, "Invalid format for --lines: %s\n", optarg); fprintf(stderr, "Must be integer in range 3..\n"); usage(argv[0]);