From 76ccb5a15a3ec3b741deefee1164ce972ac00ee1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Thu, 8 Jul 2010 13:53:15 -0400 Subject: Print if we're uid 0 --- dotfiles/bashrc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'dotfiles') 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 " " + fi +} + +PS1='\W$(_format_uid)$(_format_inroot_dir)$(__git_ps1 " [git %s]") \$ ' export PS1 -- cgit