private boolean readDevice;
private boolean exitOnFirstMatch;
public GrepCommand() {
super("Search for lines that match a string or regex");
MatcherFixed = new FlagArgument("matcher-fixed", 0, help_matcher_fixed);
MatcherBasic = new FlagArgument("matcher-basic", 0, help_matcher_basic);
MatcherExt = new FlagArgument("matcher-ext", 0, help_matcher_ext);
MatcherPerl = new FlagArgument("matcher-perl", 0, help_matcher_perl);
registerArguments(MatcherFixed, MatcherBasic, MatcherExt, MatcherPerl);
IgnoreCase = new FlagArgument("ignore-case", 0, help_case);
Invert = new FlagArgument("invert", 0, help_invert);
MatchWord = new FlagArgument("word-match", 0, help_match_word);
MatchLine = new FlagArgument("line-match", 0, help_match_line);
MaxCount = new IntegerArgument("max-matches", 0, help_max);
Quiet = new FlagArgument("quiet", 0, help_quiet);
Suppress = new FlagArgument("suppress", 0, help_suppress);
Debug = new FlagArgument("debug", 0, help_debug);
registerArguments(IgnoreCase, Invert, MatchWord, MatchLine, MaxCount, Quiet, Suppress, Debug);
ShowCount = new FlagArgument("show-count", 0, help_count);
ShowFileNoMatch = new FlagArgument("show-files-nomatch", 0, help_file_nomatch);
ShowFileMatch = new FlagArgument("show-files-match", 0, help_file_match);
ShowOnlyMatch = new FlagArgument("show-only-match", 0, help_only_matching);
registerArguments(ShowCount, ShowFileNoMatch, ShowFileMatch, ShowOnlyMatch);
PrefixByte = new FlagArgument("prefix-byte", 0, help_prefix_byte);
PrefixFile = new FlagArgument("prefix-file", 0, help_prefix_file);
PrefixNoFile = new FlagArgument("prefix-nofile", 0, help_prefix_nofile);
PrefixLabel = new StringArgument("prefix-label", 0, help_prefix_label);
PrefixLine = new FlagArgument("prefix-line", 0, help_prefix_line);
PrefixTab = new FlagArgument("prefix-tab", 0, help_prefix_tab);
PrefixNull = new FlagArgument("prefix-null", 0, help_prefix_null);
registerArguments(PrefixByte, PrefixFile, PrefixNoFile, PrefixLabel, PrefixLine, PrefixTab, PrefixNull);
ContextAfter = new IntegerArgument("show-context-after", 0, help_context_after);
ContextBefore = new IntegerArgument("show-context-before", 0, help_context_before);
ContextBoth = new IntegerArgument("show-context-both", 0, help_context_both);
registerArguments(ContextAfter, ContextBefore, ContextBoth);
ModeBinary = new StringArgument("mode-binary", 0, help_mode_binary);
ModeDevice = new StringArgument("mode-device", 0, help_mode_device);
ModeDir = new StringArgument("mode-dir", 0, help_mode_dir);
ModeBinaryText = new FlagArgument("mode-binary-text", 0, help_mode_binary_text);
ModeBinarySkip = new FlagArgument("mode-binary-skip", 0, help_mode_binary_skip);
ModeDirRecurse = new FlagArgument("mode-dir-recurse", 0, help_mode_dir_recurse);
Exclude = new StringArgument("pattern-exclude", 0, help_exclude);
ExcludeFile = new FileArgument("pattern-exclude-file", Argument.EXISTING, help_exclude_file);
ExcludeDir = new StringArgument("pattern-exclude-dir", 0, help_exclude_dir);
Include = new StringArgument("pattern-include", 0, help_include);
registerArguments(ModeBinary, ModeBinaryText, ModeBinarySkip, ModeDevice, ModeDir, ModeDirRecurse);
registerArguments(Exclude, ExcludeFile, ExcludeDir, Include);
NullTerm = new FlagArgument("null-term", 0, help_null_term);
Patterns = new StringArgument("patterns", Argument.MULTIPLE | Argument.MANDATORY, help_patterns);
PatternFiles = new FileArgument("pattern-files", Argument.MULTIPLE | Argument.EXISTING, help_pattern_files);
Files = new
FileArgument("files", Argument.MULTIPLE | Argument.EXISTING | FileArgument.HYPHEN_IS_SPECIAL, help_files);
registerArguments(Patterns, PatternFiles, Files, NullTerm);