diff options
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" "$@" |
