30 lines
730 B
Plaintext
30 lines
730 B
Plaintext
|
# Copyright (c) 2010
|
||
|
# Thorsten Glaser <t.glaser@tarent.de>
|
||
|
# This file is provided under the same terms as mksh.
|
||
|
#-
|
||
|
# Minimal /system/etc/mkshrc for Android
|
||
|
|
||
|
: ${TERM:=vt100} ${HOME:=/data} ${MKSH:=/system/bin/sh} ${HOSTNAME:=android}
|
||
|
: ${SHELL:=$MKSH} ${USER:=$(typeset x=$(id); x=${x#*\(}; print -r -- ${x%%\)*})}
|
||
|
if (( USER_ID )); then PS1='$'; else PS1='#'; fi
|
||
|
function precmd {
|
||
|
typeset e=$?
|
||
|
|
||
|
(( e )) && print -n "$e|"
|
||
|
}
|
||
|
PS1='$(precmd)$USER@$HOSTNAME:${PWD:-?} '"$PS1 "
|
||
|
export HOME HOSTNAME MKSH PS1 SHELL TERM USER
|
||
|
alias l='ls'
|
||
|
alias la='l -a'
|
||
|
alias ll='l -l'
|
||
|
alias lo='l -a -l'
|
||
|
|
||
|
for p in ~/.bin; do
|
||
|
[[ -d $p/. ]] || continue
|
||
|
[[ :$PATH: = *:$p:* ]] || PATH=$p:$PATH
|
||
|
done
|
||
|
|
||
|
unset p
|
||
|
|
||
|
: place customisations above this line
|