bash-tricks
bash-tricks copied to clipboard
Check whether is inside a git directory before running cdp
When called outside of a git directory the cdp function would enter an infinite loop. Just included a conditional to check whether if it is or not inside a git repo, case not just output a message to stdout and return 1.