pkgs/git-diff-word: Add git shortcut to diff by character
This commit is contained in:
9
pkgs/git-diff-word/default.nix
Normal file
9
pkgs/git-diff-word/default.nix
Normal file
@@ -0,0 +1,9 @@
|
||||
{ pkgs, ... }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "git-diff-word";
|
||||
text = builtins.readFile ./git-diff-word.sh;
|
||||
runtimeInputs = with pkgs; [
|
||||
git
|
||||
];
|
||||
}
|
5
pkgs/git-diff-word/git-diff-word.sh
Executable file
5
pkgs/git-diff-word/git-diff-word.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
set -euo pipefail
|
||||
|
||||
git diff --word-diff=color --word-diff-regex="." "$@"
|
Reference in New Issue
Block a user