Created
August 25, 2011 17:30
-
-
Save bsdf/1171221 to your computer and use it in GitHub Desktop.
baszh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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