Fixes broken shell prompt in Terminal and adb shell Before: https://del.dog/7vphlkc After: https://del.dog/vhkjgo8 Add as prebuilt with suffix "_twrp" to avoid conflict with original mkshrc and rename via POST_INSTALL_CMD Prebuilt version adjusts TMPDIR variable from "/data/local/tmp" to "/tmp" for TWRP Change-Id: I42a1b2a8c114f66dbe659c07485f1dfae8a5d314
22 lines
484 B
Plaintext
Executable File
22 lines
484 B
Plaintext
Executable File
# Copyright (c) 2010, 2012, 2013, 2014
|
|
# Thorsten Glaser <tg@mirbsd.org>
|
|
# This file is provided under the same terms as mksh.
|
|
#-
|
|
# Minimal /system/etc/mkshrc for Android
|
|
#
|
|
# Support: https://launchpad.net/mksh
|
|
|
|
: ${HOSTNAME:=$(getprop ro.product.device)}
|
|
: ${HOSTNAME:=android}
|
|
: ${TMPDIR:=/tmp}
|
|
export HOSTNAME TMPDIR
|
|
|
|
if (( USER_ID )); then PS1='$'; else PS1='#'; fi
|
|
PS4='[$EPOCHREALTIME] '; PS1='${|
|
|
local e=$?
|
|
|
|
(( e )) && REPLY+="$e|"
|
|
|
|
return $e
|
|
}$HOSTNAME:${PWD:-?} '"$PS1 "
|