Skip to content

🐛 rg --json -l | delta yields unexpected results #2042

@antoniojkim

Description

@antoniojkim

If you specify the -l option to ripgrep and pipe the output into delta and the file names contain hyphens, then we get unexpected behaviour.

I've constructed this small reproducer

 $ rg --json "test" | delta
test-3
1:test

test-1
1:test

test-2
1:test

with -l, I would expected just the names of the 3 test files, but instead

 rg --json -l "test" | delta
test:3
test:2
test:1

The hyphens get turned into semicolons, despite the output of ripgrep being as expected

$ rg --json -l "test"
test-3
test-2
test-1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions