+ else if(strcmp(argv[i], "-m") == 0) {
+ with_colors = 0;
+ i++;
+ }
+
+ else if(strcmp(argv[i], "-f") == 0) {
+ check_opt(argc, argv, i, 1, "<input filename>");
+ strncpy(input_filename, argv[i+1], buffer_size);
+ i += 2;
+ }
+
+ else if(strcmp(argv[i], "-b") == 0) {
+ no_blink = 1;
+ i++;
+ }
+
+ else if(strcmp(argv[i], "-z") == 0) {
+ zsh_history = 1;
+ i++;
+ }
+
+ else if(strcmp(argv[i], "-l") == 0) {
+ check_opt(argc, argv, i, 1, "<maximum number of lines>");
+ nb_lines_max = atoi(argv[i+1]);
+ i += 2;
+ }
+
+ else if(strcmp(argv[i], "-c") == 0) {
+ check_opt(argc, argv, i, 4, "<fg modeline> <bg modeline> <fg highlight> <bg highlight>");
+ color_fg_modeline = atoi(argv[i+1]);
+ color_bg_modeline = atoi(argv[i+2]);
+ color_fg_highlight = atoi(argv[i+3]);
+ color_bg_highlight = atoi(argv[i+4]);
+ i += 5;
+ }
+
+ else {
+ cerr << "Selector version " << VERSION
+ << endl
+ << "Written by Francois Fleuret <francois@fleuret.org>"
+ << endl
+ << argv[0]
+ << " [-h]"
+ << " [-v]"
+ << " [-m]"
+ << " [-z]"
+ << " [-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>]"
+ << " [-o <output filename>]"
+ << " [-s <pattern separator>]"
+ << " [-l <max number of lines>]"
+ << " -f <input filename>"
+ << endl;
+ if(strcmp(argv[i], "-h") == 0) {
+ exit(0);
+ } else {
+ exit(1);
+ }
+ }