+/config

my dotfiles and nix configuration

git clone https://git.julia.blue/+/config

Julia RyanAdd git lineblame21e74a3

main
311 B20 linesraw
1#!/usr/bin/env bash
2
3set -euo pipefail
4
5if [[ $# -ne 2 ]]; then
6  echo "usage: $0 <file> <line>" >&2
7  exit 1
8fi
9
10file="$1"
11line="$2"
12
13rev=$(git blame -L "$line",+1 "$file" | choose 0)
14
15if echo "$rev" | rg '^0+$' >/dev/null; then
16  echo Not Committed Yet
17  exit 0
18fi
19
20git show --format="%an | %ar | %s" $rev -s