# git super command # make sure with zsh that the git plugin is not used # as it will override this command g () { if [[ $# -gt 0 ]] then git "$@" if [[ `uname` = 'Darwin' && $1 = "init" ]] then # prompt for the username and email to use echo "Will this be a CMM repo?" select yn in "Yes" "No"; do case $yn in Yes ) git_cmm; break;; No ) git_personal; break;; esac done fi else git status fi } # git local repo user git_personal () { git config user.name "Your Name" git config user.email "you@yourdomain.com" } # git work repo user git_work () { git config user.name "Your Name" git config user.email "you@workdomain.com" }