Skip to content

Instantly share code, notes, and snippets.

@bsdf
Created August 25, 2011 17:30
Show Gist options
  • Save bsdf/1171221 to your computer and use it in GitHub Desktop.
Save bsdf/1171221 to your computer and use it in GitHub Desktop.
baszh
# im trying to override a command in $PATH to have a special case,
# then fallback to the original executable otherwise
# works in bash, doesn't work in zsh
git () {
if [[ $1 == 'something' ]]; then
echo 'something'
else
`which git` $*
fi
}
# works in zsh, doesn't work in bash
git () {
if [[ $1 == 'something' ]]; then
echo 'something'
else
=git $*
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment