p-ranav / hypergrep

Recursively search directories for a regex pattern
MIT License
204 stars 7 forks source link

Support -e,--regexp and -f,--file #36

Closed p-ranav closed 1 year ago

p-ranav commented 1 year ago
-e, --regexp <PATTERN>...                    
        A pattern to search for. This option can be provided multiple times, where
        all patterns given are searched. Lines matching at least one of the provided
        patterns are printed. This flag can also be used when searching for patterns
        that start with a dash.

        For example, to search for the literal '-foo', you can use this flag:

            hg -e -foo
p-ranav commented 1 year ago
-f, --file <PATTERNFILE>...                  
        Search for patterns from the given file, with one pattern per line. When this
        flag is used multiple times or in combination with the -e/--regexp flag,
        then all patterns provided are searched. Empty pattern lines will match all
        input lines, and the newline is not counted as part of the pattern.

        A line is printed if and only if it matches at least one of the patterns.