Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

diff_highlight

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

diff_highlight

  • 0.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

DiffHighlight

(C) John Mair (banisterfiend)

Applies syntax highlighting to a git diff. Use as follows:

git diff | diff_highlight | less

Output:

img

Features

  • Makes its best guess at the language appearing in the diff and uses appropriate highlighter
  • Supports Ruby, Javascript, C, YAML, Rakefiles, CSS, HTML, etc
  • Supports multiple languages in the same diff
  • Supports streaming input and output

How to use

This gem provides the diff_highlight executable. Just install the gem and the executable should be available :) Use as follows: git diff | diff_highlight | less

Or setup a git alias:

In ~/.gitconfig:

[alias]
    diffc="!f() { git diff $@ | diff_highlight | less; }; f"

And use like so:

git diffc HEAD~2

License

The gem is available as open source under the terms of the MIT License.

FAQs

Package last updated on 19 Feb 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc