feat: use difftastic

This commit is contained in:
Daniel Bauer
2026-03-29 14:02:10 +02:00
parent b067c27053
commit e69867d43d
2 changed files with 24 additions and 0 deletions

View File

@@ -35,6 +35,7 @@
[diff]
noprefix = true
colorMoved = True
external = difft
[commit]
verbose = true
[color "status"]

View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
set -euo pipefail
INSTALL_DIR="${HOME}/.local/bin"
BINARY_NAME="difft"
TARBALL="difft-x86_64-unknown-linux-gnu.tar.gz"
DOWNLOAD_URL="https://github.com/Wilfred/difftastic/releases/latest/download/${TARBALL}"
echo "Downloading difftastic..."
wget -q --show-progress -O "/tmp/${TARBALL}" "${DOWNLOAD_URL}"
echo "Extracting..."
tar -xzf "/tmp/${TARBALL}" -C /tmp
echo "Installing to ${INSTALL_DIR}..."
sudo mv "/tmp/${BINARY_NAME}" "${INSTALL_DIR}/${BINARY_NAME}"
sudo chmod +x "${INSTALL_DIR}/${BINARY_NAME}"
echo "Cleaning up..."
rm -f "/tmp/${TARBALL}"
echo "difftastic installed successfully!"
difft --version