X-Git-Url: http://git.osdn.net/view?a=blobdiff_plain;f=mkshrc;h=d37de12d1ec11b97a43ea0e0f466ae72a6011d2d;hb=8b710dfea6daff5dc99ac942bd6016d3d84bba73;hp=0da5ea63b5e0b06d5a0b335b688082ac6f3e8ae3;hpb=5155f1c7438ef540d7b25eb70aa1639579795b07;p=android-x86%2Fexternal-mksh.git diff --git a/mkshrc b/mkshrc index 0da5ea6..d37de12 100644 --- a/mkshrc +++ b/mkshrc @@ -1,29 +1,18 @@ -# Copyright (c) 2010 -# Thorsten Glaser +# Copyright (c) 2010, 2012, 2013, 2014 +# Thorsten Glaser # This file is provided under the same terms as mksh. #- # Minimal /system/etc/mkshrc for Android +# +# Support: https://launchpad.net/mksh -: ${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' +set +o nohup -for p in ~/.bin; do - [[ -d $p/. ]] || continue - [[ :$PATH: = *:$p:* ]] || PATH=$p:$PATH -done +if (( USER_ID )); then PS1='$'; else PS1='#'; fi +PS4='[$EPOCHREALTIME] '; PS1='${| + local e=$? -unset p + (( e )) && REPLY+="$e|" -: place customisations above this line + return $e +}$HOSTNAME:${PWD:-?} '"$PS1 "