diff options
-rw-r--r-- | fzy.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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]); |