Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Match section-delimeter across lines #682

Open
xav-ie opened this issue Jan 16, 2025 · 1 comment
Open

Feature Request: Match section-delimeter across lines #682

xav-ie opened this issue Jan 16, 2025 · 1 comment
Labels
enhancement New feature or request

Comments

@xav-ie
Copy link

xav-ie commented Jan 16, 2025

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 xav-ie changed the title Question: Can you match section-delimeter across lines? Feature Request: Match section-delimeter across lines Jan 16, 2025
@noborus
Copy link
Owner

noborus commented Jan 17, 2025

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

@noborus noborus added the enhancement New feature or request label Jan 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants