view_name=
+function in_git_repo {
+ pwd=$PWD
+
+ while [ "$pwd" != "/" ]; do
+ if [ -d "$pwd/.git" ]; then
+ true;
+ return;
+ fi
+
+ pwd=$(dirname $pwd)
+ done
+
+ false
+} # in_git_repo
+
# Function to set the title bar. Works on the terminal emulators listed.
function title_bar {
prefix="$@"
current_dir="$current_dir ($(cat CVS/Root | tr -d $CR))"
fi
+ # Add GIT info if available
+ if in_git_repo; then
+ current_dir="git: $(git branch | sed -n -e 's/^\* \(.*\)/\1/p') $current_dir"
+ fi
+
if [ "$TERM" = "hpterm" -o \
"$TERM" = "hp" -o \
"$TERM" = "2392A" ]; then
} # ssh
function sj {
- if [ $ARCH = "FreeBSD" ]; then
+ if [ $ARCHITECTURE = "FreeBSD" ]; then
psopts="-aux"
else
psopts="-ef"