summaryrefslogtreecommitdiff
path: root/git
diff options
context:
space:
mode:
authorGravatar steering72532026-05-18 01:25:46 -0600
committerGravatar steering72532026-05-18 01:25:46 -0600
commitdc54a69b7552d8d44adf25b8009992c4a2b395be (patch)
tree0c1864e9239bf02fc83408be378d983070250ead /git
init
Diffstat (limited to 'git')
-rwxr-xr-xgit28
1 files changed, 28 insertions, 0 deletions
diff --git a/git b/git
new file mode 100755
index 0000000..742bff1
--- /dev/null
+++ b/git
@@ -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" "$@"