impr: relaunch fzf only when necessary

This commit is contained in:
2025-07-03 11:41:14 +02:00
parent c8f88b2410
commit bc0233962a
7 changed files with 303 additions and 255 deletions

View File

@@ -1,25 +0,0 @@
if [ "${1:-}" = "--git-init" ]; then
shift
if [ -n "${GIT:-}" ]; then
err "Git already enabled"
return 1
fi
if ! command -v "git" >/dev/null; then
err "Git not installed"
return 1
fi
git -C "$ROOT" init
git -C "$ROOT" add -A
git -C "$ROOT" commit -m 'Initial commit: Start git tracking'
exit
fi
if [ "${1:-}" = "--git" ]; then
shift
if [ -z "${GIT:-}" ]; then
err "Git not supported, run \`$0 --git-init\` first"
return 1
fi
$GIT "$@"
exit
fi