summaryrefslogtreecommitdiff
path: root/.local/bin/development/gi
blob: f7884a94a5c84ede69405f6180b6cd8b1c89e27a (plain)
1
2
3
4
5
6
7
8
#!/bin/sh

# gi (git-ignore) - open current repo's gitingore file in $EDITOR

[ -f .gitignore ] && { ${EDITOR:-nvim -p} .gitignore; exit; }

TOPLEVEL="$(git rev-parse --show-toplevel)" || exit
find "$TOPLEVEL" -name ".gitignore" | xargs -r ${EDITOR:-nvim -p}