*/
// To use it as a super-history-search for bash:
-//
// alias h='selector -d -i -b -v -f <(history)'
-// This software is highly Linux-specific, but I would be glad to get
-// patches to make it work on other OS
-
#include <fstream>
#include <iostream>
<< "Written by Francois Fleuret <francois@fleuret.org>."
<< endl
<< endl
- << argv[0]
- << " [-h]"
- << " [-v]"
- << " [-m]"
- << " [-d]"
- << " [-e]"
- << " [-b]"
- << " [-z]"
- << " [-i]"
- << " [-c <fg modeline> <bg modeline> <fg highlight> <bg highlight>]"
- << " [-o <output filename>]"
- << " [-s <pattern separator>]"
- << " [-l <max number of lines>]"
- << " -f <input filename>"
+ << "Usage: " << argv[0] << " [options] -f <file>" << endl
+ << endl
+ << " -h show this help" << endl
+ << " -v inject the selection in the tty" << endl
+ << " -m monochrome mode" << endl
+ << " -d remove duplicated lines" << endl
+ << " -e regexp mode when starting" << endl
+ << " -b remove the bash history line prefix" << endl
+ << " -z remove the zsh history line prefix" << endl
+ << " -i invert the line order" << endl
+ << " -c <fg modeline> <bg modeline> <fg highlight> <bg highlight>" << endl
+ << " set the display colors" << endl
+ << " -o <output filename>" << endl
+ << " set a file to write the selected line to" << endl
+ << " -s <pattern separator>" << endl
+ << " set the symbol to separate substrings in the pattern" << endl
+ << " -l <max number of lines>" << endl
+ << " set the maximum number of lines to take into account" << endl
<< endl;
exit(error);