summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config/root-.bashrc14
1 files changed, 10 insertions, 4 deletions
diff --git a/config/root-.bashrc b/config/root-.bashrc
index 2871be79..3973e692 100644
--- a/config/root-.bashrc
+++ b/config/root-.bashrc
@@ -1,12 +1,18 @@
# Execute the user's rootrc file if it exists instead of this one.
-if [ $USER && $USER != root ]; then
- . ~$USER/.root_bashrc
+case "$USER" in
+ "" | root)
+ UHOME="";;
+ *)
+ UHOME="`eval echo ~$USER`";;
+esac
+
+if [ "$UHOME" -a -r "$UHOME/.root_bashrc" ]; then
+ . "$UHOME/.root_bashrc"
else
-# define some handy aliases
+ # define some handy aliases
alias j jobs -l
alias c clear
alias z suspend
alias d dirs
fi
- \ No newline at end of file