Skip to content

[feature] Add file modify state to output for less pre-seeding #135

@niedzielski

Description

@niedzielski

I just saw delta on Hacker News! Congrats!

delta looks super useful but I'm missing the pre-seed feature of diff-so-fancy which allows one to page through each file by tapping n. I've found the following less options work well but it needs file state delimiters (e.g., commit, added, deleted, modified, ...):

# Warning: silly regex ahead!
pager = delta --commit-style box --tabs 2 | less -iRFXx2 '+/^(commit|added:|deleted:|modified:|renamed:|stash@\\{[0-9]+\\}:) | changed file mode from [0-9]{6} to [0-9]{6}$'

A cursory test of delta shows everything but file modifies are identified because these file state demarcations are omitted. I didn't see any options for adding the markers back in so this is a feature request to enable that functionality!

As a workaround, I think I could use a dash () regex but I really want the highlight to be on the filename itself, not the dash, as the line above the match is cut off by the terminal (the filename in this case).

Thank you so much for this awesome tool! It looks great! 👍

Edit (2020-04-27): Actually, I think my first report was terrible. Only file modify markers (both modified and changed file mode) are omitted. The others seem to be present. Updated.

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