diff options
| author | 2026-05-18 01:25:46 -0600 | |
|---|---|---|
| committer | 2026-05-18 01:25:46 -0600 | |
| commit | dc54a69b7552d8d44adf25b8009992c4a2b395be (patch) | |
| tree | 0c1864e9239bf02fc83408be378d983070250ead /git | |
init
Diffstat (limited to 'git')
| -rwxr-xr-x | git | 28 |
1 files changed, 28 insertions, 0 deletions
@@ -0,0 +1,28 @@ +#!/bin/bash +# Some git subcommands are made available to you. +# Use `select <repo>` first. + + + +if [ $# -lt 1 ]; then + echo "Usage: $0 <subcommand>..." >&2 + echo "Available subcommands:" >&2 + ls "$0.d" >&2 + exit 1 +fi + +subcmd="$1" +if [ ! -x "$0.d/$subcmd" ]; then + echo "$0: error: unknown subcommand: $subcmd" >&2 + echo "Available subcommands:" >&2 + ls "$0.d" >&2 + exit 1 +fi + +export SELECTED_REPO="$(cat "$HOME/.selection" 2>/dev/null)" + +shift + +export PARENTCMD="$0" + +exec "$0.d/$subcmd" "$@" |
