#!/usr/bin/env bash
declare -r BIN_DIR=$(cd $(dirname ${0}); pwd)
declare -- PATH=${PATH/${BIN_DIR}/}
export PATH
case "${@}" in
'branch') printf " %s\n" "feature" "bugfix" "main" ;;
'rev-parse --show-toplevel') echo "/git/root" ;;
'rev-parse --abbrev-ref HEAD') echo 'bugfix' ;;
'checkout'*) echo "Switched to branch '${2}'" ;;
*) echo ${NAME} ${@} ;;
esac