summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Walters <walters@verbum.org>2010-07-08 13:53:15 -0400
committerColin Walters <walters@verbum.org>2010-07-08 13:53:15 -0400
commit76ccb5a15a3ec3b741deefee1164ce972ac00ee1 (patch)
tree678dd0618f490650e67b2ea0e84ba78141297991
parent09c46a49094cdc77c36780841ee9db99c7241e29 (diff)
downloadhomegit-MOVED-TO-GNOME-76ccb5a15a3ec3b741deefee1164ce972ac00ee1.zip
homegit-MOVED-TO-GNOME-76ccb5a15a3ec3b741deefee1164ce972ac00ee1.tar.gz
homegit-MOVED-TO-GNOME-76ccb5a15a3ec3b741deefee1164ce972ac00ee1.tar.xz
Print if we're uid 0
-rw-r--r--dotfiles/bashrc9
1 files changed, 8 insertions, 1 deletions
diff --git a/dotfiles/bashrc b/dotfiles/bashrc
index 7abf9bd..d49c012 100644
--- a/dotfiles/bashrc
+++ b/dotfiles/bashrc
@@ -23,6 +23,13 @@ _format_inroot_dir ()
fi
}
-PS1='\W$(_format_inroot_dir)$(__git_ps1 " [git %s]") \$ '
+_format_uid ()
+{
+ if test $(id -u) = '0'; then
+ echo " <uid=0>"
+ fi
+}
+
+PS1='\W$(_format_uid)$(_format_inroot_dir)$(__git_ps1 " [git %s]") \$ '
export PS1