Thorsten Glaser | ba2627c | 2010-08-24 18:21:37 +0200 | [diff] [blame] | 1 | # Copyright (c) 2010 |
| 2 | # Thorsten Glaser <t.glaser@tarent.de> |
| 3 | # This file is provided under the same terms as mksh. |
| 4 | #- |
| 5 | # Minimal /system/etc/mkshrc for Android |
| 6 | |
| 7 | : ${TERM:=vt100} ${HOME:=/data} ${MKSH:=/system/bin/sh} ${HOSTNAME:=android} |
| 8 | : ${SHELL:=$MKSH} ${USER:=$(typeset x=$(id); x=${x#*\(}; print -r -- ${x%%\)*})} |
| 9 | if (( USER_ID )); then PS1='$'; else PS1='#'; fi |
| 10 | function precmd { |
| 11 | typeset e=$? |
| 12 | |
| 13 | (( e )) && print -n "$e|" |
| 14 | } |
| 15 | PS1='$(precmd)$USER@$HOSTNAME:${PWD:-?} '"$PS1 " |
| 16 | export HOME HOSTNAME MKSH PS1 SHELL TERM USER |
| 17 | alias l='ls' |
| 18 | alias la='l -a' |
| 19 | alias ll='l -l' |
| 20 | alias lo='l -a -l' |
| 21 | |
| 22 | for p in ~/.bin; do |
| 23 | [[ -d $p/. ]] || continue |
| 24 | [[ :$PATH: = *:$p:* ]] || PATH=$p:$PATH |
| 25 | done |
| 26 | |
| 27 | unset p |
| 28 | |
| 29 | : place customisations above this line |