Skip to content

🐛 walls of text produced for minified js when using rg --json input #2111

@mgkurtz

Description

@mgkurtz

Experienced behavior

When input comes from ripgrep’s rg --json, delta shows minified js files in one loooooooong line potentially covering several screens. This hampers my workflow each time it appears, which is relatively often, given that piping ripgrep’s json output into delta is my default search setup.

Expected behavior

Respect the --max-line-length option and truncate long lines for json input as well.

Notes

Ripgrep itself ignores its --max-columns option for --json output, one could also fix that. Though, I believe this to be better fixed on delta’s side.

Example

A screenshot produced by feeding some ripgrep output into delta.

screenshot

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