Skip to content

Flag to only output matched lines #150

Description

@tyilo

It would be nice to have an option to only output matched lines:

$ cat test.txt
foo aaa bar
baz
foo bbb bar
$ sd 'foo (.*) bar' '$1' < test.txt
aaa
baz
bbb
$ sd --only-matched-lines 'foo (.*) bar' '$1' < test.txt
aaa
bbb

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-CLIArea: CLI, completions, exit codes oh myC-enhancementCategory: New feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions