I already use delta for this: https://github.com/dandavison/delta I thought delta was fairly well-known by now so I was surprised to see this project not mention it (the readme already has a section for that). I wonder what they've chosen to do differently, besides write it in Node.js.
Yeah I (un)fortunately learned about delta too late or I probably wouldn't have made this. The main difference is that delta's default styles and appearance did not appeal to me. I'm sure it can be customized, but I wanted something that looked great by default. I especially like that the syntax highlighting matches vscode's since that's the editor I use for work.
Show HN: GitHub style split diffs in your terminal
31–40 of 53 posts
Re: Show HN: GitHub style split diffs in your terminal
#32I wrote a small script that tracks changes to your kubernetes cluster and sends a diff of the yaml to Slack. It works but I want to prettify the diff with a GitHub style diff and I need it in image format to send to slack.
Re: Show HN: GitHub style split diffs in your terminal
#33It can be easily set up...
Re: Show HN: GitHub style split diffs in your terminal
#34Is anyone familiar with a good way to programatically create a diff like this as an image? I wrote a small script that tracks changes to your kubernetes cluster and sends a diff of the yaml to Slack. It works but I want to prettify the diff with a GitHub style diff and I need it in image format to send to slack.
Re: Show HN: GitHub style split diffs in your terminal
#35Is anyone familiar with a good way to programatically create a diff like this as an image? I wrote a small script that tracks changes to your kubernetes cluster and sends a diff of the yaml to Slack. It works but I want to prettify the diff with a GitHub style diff and I need it in image format to send to slack.
I actually tried to automate the screenshots for this project's readme using GitHub actions, but struggled to get it to produce the same quality screenshots as my local machine. This is the script I use for now, which has to be invoked manually: https://github.com/banga/git-split-diffs/blob/main/scripts/g...
Re: Show HN: GitHub style split diffs in your terminal
#36Earlier quoted context omitted.
It's not about language nor dependency tree per se. It's about what is in that dependency tree. When I depend on a library A in say Python I can be reasonably sure that it won't download and execute random shit from Internet, nor that it will pull tons of other crap to log to console in colorful ANSI boxes. Basically, it's about NPM ecosystem, which is anything but trustworthy to be run as a terminal application. EDI…
This is illusory safety. The exact same risks are present in PyPI. There've been plenty of notorious malicious PyPI package incidents and there will be plenty more. If there are dependencies, there could be security risks. JavaScript and NPM just have higher market share, so that's where attackers are more likely to focus their efforts. This is akin to all the people who used to say Macs aren't or can't be infected w…
Re: Show HN: GitHub style split diffs in your terminal
#37Re: Show HN: GitHub style split diffs in your terminal
#38When I find myself wanting a split diff in the terminal, I tend to gravitate towards just using Vim’s built in diff mode via vim-fugitive. I even have some git aliases that will open vim and and show fugitive diffs for every file changed on the current branch. The I like this over fancy CLI diff viewers for a handful of reasons: - It re-uses my editor config (no need to fuss with that tools ad hoc config format) - I…
Have you (or anyone reading this) been able to figure out how to get diff-highlight to be more intelligent so that if 'foo' changes to "foo", the highlighter is smart enough to only highlight the quotes as changing, but not the word foo? (Though this example is trivial, any time you've got two changes on the same line, this issue occurs where everything in between those changes gets highlighted as well.) I noticed that other tools in this thread such as delta and banga don't suffer from this issue.
Re: Show HN: GitHub style split diffs in your terminal
#39Earlier quoted context omitted.
This is illusory safety. The exact same risks are present in PyPI. There've been plenty of notorious malicious PyPI package incidents and there will be plenty more. If there are dependencies, there could be security risks. JavaScript and NPM just have higher market share, so that's where attackers are more likely to focus their efforts. This is akin to all the people who used to say Macs aren't or can't be infected w…
I think a big problem with the node ecosystem is the lack of standard library. When I'm developing on PHP, Python, or go, they have a vast standard library that means the likelihood of me using a third-party package is relatively low for the most mundane stuff. Comparing that to node, and you'll need to use an npm package for just about anything. This automatically gives you a much larger attack surface. If I underst…
Or to say "When I depend on a library A in say Python I can be reasonably sure that it won't download and execute random shit from Internet", which is just completely untrue and misguided in a lot of ways. It's absolutely just as easy for anyone to backdoor a Python package as it is to backdoor an NPM package, and it happens all the time. It's possible it could happen a lot more frequently in the future, too.
You could argue that statement's true in a sense, but given that same sense it's also true of Node; it's not a good way of thinking about dependency supply chain attacks.
Re: Show HN: GitHub style split diffs in your terminal
#40I already use delta for this: https://github.com/dandavison/delta I thought delta was fairly well-known by now so I was surprised to see this project not mention it (the readme already has a section for that). I wonder what they've chosen to do differently, besides write it in Node.js.