Comments (3)
Hi @infokiller, nice to hear from you. I view it as desired behavior, not a bug, that git does not use delta when output is going to a pipe: IMO delta's output is for humans to read, not for machines to parse, so there are few scenarios when one wants delta's output to go to a pipe/file. Do you have such a scenario?
As you say, the way this (IMO desired) behavior is achieved is that git itself doesn't invoke its pager when output is not a tty (because the git authors view the pager output as for human eyes, not machines). That means also that there's a simple solution for the cases when one does want delta's output to go to a pipe: pipe it into delta explicitly:
git diff | delta | head
So I'm definitely happy to hear ideas about GIT_EXTERNAL_DIFF
, but I'm going to close this since I don't think delta should change anything regarding this behavior. But do feel free to reopen.
from delta.
That said there is something fairly esoteric in one of the end-to-end tests that does what you're asking for I think!
delta/tests/test_navigate_less_history_file
Lines 32 to 34 in 59b4a2e
from delta.
Hi @dandavison great to talk to you again and thanks for the quick response!
My use case was using it for fzf previews. Indeed, both of your suggestions work fine for this use case, thanks!
from delta.
Related Issues (20)
- π Always using light theme on dark background HOT 9
- π 0.17.0 seems much slower then 0.16.5 HOT 13
- π --navigate n/N jumps to next/prev hunk, not file? HOT 3
- RUSTSEC-2024-0320: yaml-rust is unmaintained.
- π Incorrect syntax-highlight with comment tag "#"
- π [Docs] Show the default config values HOT 1
- π Extra newline before diffs
- π Empty diff for proc files
- [Feature Request] Show percentage of how far the entire diff has been read
- `git grep -l` replaces first `-` with a `:` HOT 1
- Not working in Ubuntu 22.04 as intendedπ
- π inserted/deleted blank lines are sometimes hard to see
- Specify light and dark themes simultaneously, and auto-switch based on system appearance HOT 1
- π ripgrep JSON output causes panic with UTF character
- π PAGER env variable will omit command line parameters
- Weird EOL characters in side-by-side diff output ( ^[[0K )
- π Mouse scroll not working in jetbrains ide's terminal
- π output using html <ins> and <del> tags
- π Printing special terminal control characters "^[]11;rgb:0000/0000/0000^G" HOT 2
- π Memory allocation error for non root user HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from delta.