Advertisement
Guest User

Untitled

a guest
Feb 28th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. function __git_ps1() {
  2. GP="";
  3. until [[ `readlink -f "$GP"` = "/" ]]; do
  4. if [[ -e "$GP.git/HEAD" ]]; then
  5. printf "$1" `cat $GP.git/HEAD | sed -re 's/.+\///g'`;
  6. GP="/";
  7. else
  8. GP="$GP../";
  9. fi
  10. done
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement