wfxr.forgit/bin/git-forgit
Tim 089853173e
Do not "set -e" in standalone forgit (#238)
Setting the error option in bash bypasses error handling in the forgit
functions, because the script immediatley exits in case of an error.
Remove the option to make error handling possible.
Bash scripts automatically return the exit code of the last statement,
so standalone forgit will still return useful error codes.
2022-10-08 00:43:47 +02:00

18 lines
509 B
Bash
Executable file

#!/usr/bin/env bash
# This file is a bridge between forgit and git itself. This makes forgit a
# subcommand of git, and forwards all arguments on to forgit. So, all of these
# commands will work as expected:
#
# `git forgit log`
# `git forgit checkout_file`
# `git forgit checkout_file README.md`
#
# This gives users the choice to set aliases inside of their git config instead
# of their shell config if they prefer.
source "$FORGIT_INSTALL_DIR/forgit.plugin.zsh"
cmd="$1"
shift
forgit::${cmd//_/::} "$@"