aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteve Kondik <steve@cyngn.com>2015-11-14 23:44:47 +0100
committerSteve Kondik <steve@cyngn.com>2015-11-14 23:49:11 +0100
commitafe6d8d503af5ac145f79c340cc1da2ff3559b7d (patch)
tree5830ca3b696007343b56dba971874cf1b0228e48
parentf13bef5fbddbd48c0783e5e7abeab3c674fd0aa4 (diff)
downloadandroid_external_bash-afe6d8d503af5ac145f79c340cc1da2ff3559b7d.tar.gz
android_external_bash-afe6d8d503af5ac145f79c340cc1da2ff3559b7d.tar.bz2
android_external_bash-afe6d8d503af5ac145f79c340cc1da2ff3559b7d.zip
bash: Update default environment
* Match mksh * Use colored ls Change-Id: I2ed8617d348344f2cfae6e896981ce4759fffaef
-rw-r--r--etc/bashrc12
1 files changed, 8 insertions, 4 deletions
diff --git a/etc/bashrc b/etc/bashrc
index 622fcbe..a86244f 100644
--- a/etc/bashrc
+++ b/etc/bashrc
@@ -5,6 +5,12 @@
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
+: ${HOME:=/sdcard}
+: ${HOSTNAME:=$(getprop ro.cm.device)}
+: ${TERM:=linux}
+: ${TMPDIR:=/data/local/tmp}
+: ${USER:=$(id -un)}
+export HOME HOSTNAME MKSH SHELL TERM TMPDIR USER
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
@@ -25,10 +31,6 @@ shopt -s histappend
use_color=false
-# set some environment variables
-export HOME=/sdcard
-export TERM=xterm
-
# enable colorful terminal
if [[ ${EUID} == 0 ]] ; then
PS1='\[\033[01;31m\]\h\[\033[01;34m\] \W \$\[\033[00m\] '
@@ -38,6 +40,8 @@ fi
alias sysro='mount -o remount,ro /system'
alias sysrw='mount -o remount,rw /system'
+alias ls='ls --color=auto'
+alias ps='/system/xbin/ps'
# Try to keep environment pollution down, EPA loves us.
unset use_color safe_term match_lhs