ov icon indicating copy to clipboard operation
ov copied to clipboard

Feature Request: Match section-delimeter across lines

Open xav-ie opened this issue 11 months ago • 1 comments

git show main~5...main has output like this:

commit 7fb7b37321cf626fd24807c896928e0761c58413 (HEAD -> main)
Author: xav-ie <[email protected]>
Date:   Wed Jan 15 12:53:23 2025 -0500

    feat(g): add

    A better git status.


Δ home-manager/programs/nushell/default.nix

My current section delimeters are like this:

git show main~5...main delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit)'"

This works mostly, but I want the second group: (^commit) to span to include Author: and Date: lines in its section match. So far, none of these work...:

# this one works, but does not match the second line
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*)'"
# the rest of these do not match at all
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\r)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\n)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\r)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\n)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\\r)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\\n)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\\\r)'"
git show main~5..main | delta --pager="ov --section-delimiter '(^(added:|removed:|renamed:|Δ))|(^commit.*\\\\n)'"

I don't want to use the number modifiers. Those modifiers apply it to all sections. I just want to match a multiline section-delimeter.

I do notice that the README says:

(Line breaks are not included in matching lines).

But I want this. Maybe the scrolling math for changing section-delimeter height does not work so well

xav-ie avatar Jan 16 '25 13:01 xav-ie

Thank you for your feature request. This is something we hope to implement in the future.

noborus avatar Jan 17 '25 02:01 noborus