Files
nix/hosts/common/configs/user/console/git/gh.sh
2025-09-01 12:47:26 +01:00

9 lines
184 B
Bash

# shellcheck shell=bash
GH_HOST="${GH_HOST:-github.com}"
GH_TOKEN=$(sed -n "s#https://[^:]*:\([^@]*\)@${GH_HOST}#\1#p" "$HOME/.config/git/credentials")
export GH_TOKEN
exec gh "$@"