diff options
| author | Thorsten Glaser <tg@mirbsd.org> | 2010-08-24 18:21:37 +0200 |
|---|---|---|
| committer | Thorsten Glaser <tg@mirbsd.org> | 2010-08-24 18:25:55 +0200 |
| commit | ba2627c6cdb3aaa40aebd362170c382b55b7b511 (patch) | |
| tree | 2c311800ff30feeca8be7967c82ffbe77b7324fc /mksh/mkshrc | |
| parent | bdc36d641c2d557cc20b8cf044048f0a8c72e774 (diff) | |
| download | system_core-ba2627c6cdb3aaa40aebd362170c382b55b7b511.tar.gz system_core-ba2627c6cdb3aaa40aebd362170c382b55b7b511.tar.bz2 system_core-ba2627c6cdb3aaa40aebd362170c382b55b7b511.zip | |
Add mksh from CVS 2010/08/24 as system/core/mksh module
Both shells (ash from system/core/sh, and mksh) are built by
default but only the one where $(TARGET_SHELL) is set to is
actually installed (the shell and the mkshrc configuration
file are tagged shell_mksh for this to work).
Signed-off-by: Thorsten Glaser <tg@mirbsd.org>
Diffstat (limited to 'mksh/mkshrc')
| -rw-r--r-- | mksh/mkshrc | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mksh/mkshrc b/mksh/mkshrc new file mode 100644 index 00000000..0da5ea63 --- /dev/null +++ b/mksh/mkshrc @@ -0,0 +1,29 @@ +# 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 |
