# ensure index is up to date
#git update-index --really-refresh -q &>/dev/null
- # check for uncommitted changes in the index
- if ! $(git diff --quiet --ignore-submodules --cached); then
- s="$s+";
- fi
-
# check for unstaged changes
if [ -n "$(git ls-files --modified)" ]; then
s="$s*";
fi
- # check for untracked files
- if [ -n "$(git ls-files --others --exclude-standard)" ]; then
- s="$s%";
+ # check for uncommitted changes in the index
+ if ! $(git diff --quiet --ignore-submodules --cached); then
+ s="$s+";
fi
# check for stashed files
s="$s$";
fi
+ # check for untracked files
+ if [ -n "$(git ls-files --others --exclude-standard)" ]; then
+ s="$s%";
+ fi
+
fi
# get the short symbolic ref
git rev-parse --short HEAD 2> /dev/null || \
printf "(unknown)")"
- [ -n "$s" ] && s=" [$s]"
+ [ -n "$s" ] && s=" $s"
printf " (%s)" "$branchName$s"
fi
}
OPS1+="\$(prompt_git)"
fi
fi
- OPS1+=" \\$\$SHLVL "
+ # This is for .screenrc: shelltitle "\$ |$SHELL"
+ #OPS1+="\[\033k\033\\\\\]"
+ OPS1+=" \$SHLVL\\$ "
export OPS1
}