[Bug 6900] New: hg grep lacks typical grep options: -w, -e, -o, -h, -F

mercurial-bugs at mercurial-scm.org mercurial-bugs at mercurial-scm.org
Thu Aug 8 18:11:57 UTC 2024


https://bz.mercurial-scm.org/show_bug.cgi?id=6900

            Bug ID: 6900
           Summary: hg grep lacks typical grep options: -w, -e, -o, -h, -F
           Product: Mercurial
           Version: 6.7.4
          Hardware: PC
                OS: NetBSD
            Status: UNCONFIRMED
          Severity: feature
          Priority: wish
         Component: Mercurial
          Assignee: bugzilla at mercurial-scm.org
          Reporter: mercurial-bugzilla at campbell.mumble.net
                CC: mercurial-devel at mercurial-scm.org
    Python Version: ---

-w: match is restricted to word boundaries
-e <pat>: specify a pattern, can begin with `-' to avoid confusion with
options, can be repeated multiple times as an OR
-o: show only the part of the line that matches, not the whole line
-h: suppress file name; show only line (or match, with -o)
-F: match fixed string instead of regular expression

I use these options pretty frequently with grep and git grep; it would be nice
if hg grep supported them too.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Mercurial-devel mailing list