• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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%%\)*})}
9if (( USER_ID )); then PS1='$'; else PS1='#'; fi
10function precmd {
11	typeset e=$?
12
13	(( e )) && print -n "$e|"
14}
15PS1='$(precmd)$USER@$HOSTNAME:${PWD:-?} '"$PS1 "
16export HOME HOSTNAME MKSH PS1 SHELL TERM USER
17alias l='ls'
18alias la='l -a'
19alias ll='l -l'
20alias lo='l -a -l'
21
22for p in ~/.bin; do
23	[[ -d $p/. ]] || continue
24	[[ :$PATH: = *:$p:* ]] || PATH=$p:$PATH
25done
26
27unset p
28
29: place customisations above this line
30