Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function __git_ps1() {
- GP="";
- until [[ `readlink -f "$GP"` = "/" ]]; do
- if [[ -e "$GP.git/HEAD" ]]; then
- printf "$1" `cat $GP.git/HEAD | sed -re 's/.+\///g'`;
- GP="/";
- else
- GP="$GP../";
- fi
- done
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement