### /etc/shinit - shell init file
# this is executed by shell - both login or non-login
# setup stuff for interactive shells only
case $- in 
	*i*)
		# interactive configurations - prompt, history, etc
		# TERM, USER and LOGNAME is already set by login/su
		PS1="$USER$ "; [ $USER = root ] && PS1="# "
		HISTFILE="$HOME/.history"	# ensure all shells use the same history
		[ "$TERM" = rxvt-unicode ] || [ "$TERM" = rxvt-unicode-256color ] && export LESS="--no-keypad"
		
		# aliases
		alias ls='ls --color=auto'
		alias grep='grep --color=auto'
		uset_title()   { printf '\33]2;%s\007' "$*"; }
		uset_font()    { [ $# -gt 0 ] && printf '\33]710;%s\007' "$*"; }
		uset_fontb()   { [ $# -gt 0 ] && printf '\33]711;%s\007' "$*"; }
		uset_fonti()   { [ $# -gt 0 ] && printf '\33]712;%s\007' "$*"; }
		uset_fontbi()  { [ $# -gt 0 ] && printf '\33]713;%s\007' "$*"; }
		uset_fontall() { [ $# -gt 0 ] && printf '\33]710;%s\007 \33]711;%s:bold\007 \33]712;%s:italic\007 \33]713;%s:bold:italic\007' "$*" "$*" "$*" "$*"; }
		aufs_reval()   { busybox mount -i -t aufs -o remount,udba=reval aufs /; }
	;;
esac

# run per-user shinit
[ -e $HOME/.shinit ] && . $HOME/.shinit
