diff --git a/mkshrc b/mkshrc index 6c20d1f..4beaf90 100644 --- a/mkshrc +++ b/mkshrc @@ -6,7 +6,7 @@ # # Support: https://launchpad.net/mksh -: ${TERM:=vt100} ${HOME:=/data} ${MKSH:=/system/bin/sh} ${HOSTNAME:=$(getprop ro.product.device)} +: ${TERM:=xterm} ${HOME:=/data} ${MKSH:=/system/bin/sh} ${HOSTNAME:=$(getprop ro.product.device)} : ${SHELL:=$MKSH} ${USER:=$(typeset x=$(id); x=${x#*\(}; print -r -- ${x%%\)*})} ${HOSTNAME:=android} if (( USER_ID )); then PS1='$'; else PS1='#'; fi PS4='[$EPOCHREALTIME] '; PS1='${| @@ -17,10 +17,6 @@ PS4='[$EPOCHREALTIME] '; PS1='${| return $e }$USER@$HOSTNAME:${PWD:-?} '"$PS1 " export HOME HOSTNAME MKSH SHELL TERM USER -alias l='ls' -alias la='l -a' -alias ll='l -l' -alias lo='l -a -l' function hd { local -Uui16 -Z11 pos=0 @@ -53,26 +49,6 @@ function hd { fi; } } -function more { - ( - set +m - cat "$@" |& - trap "rv=\$?; kill $! >/dev/null 2>&1; exit \$rv" EXIT - while IFS= read -pr line; do - llen=${%line} - (( llen == -1 )) && llen=${#line} - (( llen = llen ? (llen + COLUMNS - 1) / COLUMNS : 1 )) - if (( (curlin += llen) >= LINES )); then - print -n -- '\033[7m--more--\033[0m' - read -u1 || exit $? - [[ $REPLY = [Qq]* ]] && exit 0 - curlin=$llen - fi - print -r -- "$line" - done - ) -} - function setenv { eval export "\"$1\""'="$2"' }