Last active
August 29, 2015 14:17
-
-
Save nthx/280e6c98eb1727fa04ef to your computer and use it in GitHub Desktop.
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
#..... | |
# configuration below *cannot* be inside .bashrc | |
. ~/public/github/dotfiles/bashrc.my.bash_zsh_support | |
#..... |
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
function gitsh { | |
if [ -d .git ]; # should also skip if-already-executed | |
then | |
if [ ! -v INVOKED_GIT_SH ]; | |
then | |
INVOKED_GIT_SH=true | |
git-sh | |
fi | |
fi | |
} | |
source ~/github/bash_zsh_support/chpwd/function.sh | |
source ~/github/bash_zsh_support/chpwd/load.sh | |
export -a chpwd_functions # define hooks as an shell array | |
[[ " ${chpwd_functions[*]} " == *" gitsh "* ]] || # prevent double addition | |
chpwd_functions+=(gitsh) # finally add it to the list |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment