5 ms·
After using delta for a while, I'm going back to the regular diff view... it's not that it isn't good, but I'm constantly copying diffs (yes, I know I can gener
by leonheld 2y ago
After using delta for a while, I'm going back to the regular diff view... it's not that it isn't good, but I'm constantly copying diffs (yes, I know I can generate patches) and the pretty output breaks that workflow.
Also, when your terminal is a bit small it's a bit hard to see things. But it's really good software, I recommend anyone who's reading to give it a try.
- JadedBlueEyes 2y agoIIRC if you pipe the output to, e.g, xclip, or redirect to a file it will give the original diff format. Not as convenient, but still workable.
- leonheld 2y agoI... did not know that! Yep yep that should do the trick for me. Thanks a lot, actually!
- mplanchard 2y agoMost tools that do formatted output, if they’re well-behaved, should try to detect if their output is a pipe and if so, disable formatting. Some examples that I can think of off the top of my head (in addition to git) are ripgrep and jq, both of which do the right thing and strip formatting.
- knome 2y agorather they should detect that output is a terminal and enable the coloring
- pca006132 2y agoWow I never knew this, I always just type `--no-ext-diff` when piping the output. Thanks!
- ramses0 2y ago`... | cat` is sometimes really handy (and universal)
- lucasoshiro 2y agoI use git -c core.pager = less, but piping seems to be a less verbose option... hmmm I'll try it
- rusk 2y agoPipe through cat should work
- PhilippGille 2y agoIsn't copying without the formatting just a `<your diff command> | pbcopy` away?
- genewitch 2y agoI have Gemini set to decipher HN comments that I don't immediately understand. This is a macos only command `pbcopy`? Aside: Gemini mentioned it didn't want me to ask it questions about bikeshedding what shade of blue on a website header so I think it's got our number.
- chuckadams 2y agoYes pbcopy is a mac thing. On Linux, there are of course many different commands in different environments/distros. xsel, xclip, wl-clipboard, wlclip to name a few. On windows, powershell has Get-Clipboard and Set-Clipboard, and cmd.exe has `wsl` to fix the issue of having used cmd.exe to begin with.
- Macha 2y agoThough, if you have a preferred shade of blue, you can actually use it for the HN header in your user settings.