Skip to content

Instantly share code, notes, and snippets.

@diije
Created January 3, 2024 14:00
Show Gist options
  • Save diije/b602634293f5b3633eb1aee40b4c40cc to your computer and use it in GitHub Desktop.
Save diije/b602634293f5b3633eb1aee40b4c40cc to your computer and use it in GitHub Desktop.
Fancy Diff
#!/usr/bin/env bash
#
# Diff wrapper piping with diff-so-fancy
#
# Prerequiste: install diff-so-fancy
# https://github.com/so-fancy/diff-so-fancy
#
# Setup:
# - save this script somewhere
# - `chmod +x` the file
# - add an alias to your `.bashrc` (or `.zshrc`):
# `alias diff='/path/to/fancy-diff'`
#
# Example usage:
# $ diff file1 file2
set -e
exec diff -u $@ | diff-so-fancy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment