Skip to content

Having grep support the -o option like GNU grep et al #232

Closed

Description

@dscho

We have most of the code for this already in the form of our color hi-lighting, it would mostly just be a matter of "just print out the stuff you'd have colored", with the small exception that if you have more than one match on a line they should be printed out on their own lines.

Copied from: https://public-inbox.org/git/87in9ucsbb.fsf@evledraar.gmail.com/

Activity

  1. added
    leftoverbitsFrom the Git mailing list: https://lore.kernel.org/git/?q=%23leftoverbits
    on May 29, 2019
  2. bbolli commented on May 29, 2019

    @bbolli

    I think this was already implemented in 9d8db06 ("grep.c: teach 'git grep --only-matching'", 2018-07-09).

  3. dscho commented on May 30, 2019

    @dscho
    MemberAuthor

    @bbolli indeed! Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    leftoverbitsFrom the Git mailing list: https://lore.kernel.org/git/?q=%23leftoverbits

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions