🚀 automatic side-by-side based on column width?
- Dominant language
- Rust
- Stars
- 32.2k
- Forks
- 572
- Avg merge
- 11m
- Merged PRs (30d)
- 1
Description
Hi, many thanks for writing delta -- I've long longed for something like it and am very happy to discover it.
One question: side-by-side views are great for looking at more complicated diffs but require substantially more horizontal space, so are IMO not a good default for git diff with typical terminal widths. On the other hand it would be great to have easy access to side-by-side git diffs when doing a more thorough review with a full screen'ed terminal. Unfortunately I'm not aware to of a way to pass the `-s` flag through when using delta as git diff backend, or some other way to easily switch case-by-case.
Assuming something like it does not already exist, how about a mechanism to provide context dependent side-by-side in git diff based on either a user-specified minimal column width or an easy way to pass flags through something like a `DELTA` env var (similar to `LESS`)?
Contributor guide
Research direction
Start by tracing how delta is invoked as a git diff backend and how the existing -s side-by-side option is handled. Compare a minimum-column-width rule with passing options through a DELTA environment variable, then verify that users can switch between normal and side-by-side output as described.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100