if [[ ! -v _sev_tmp ]] {
_sev_tmp=~/.local/tmp
# create personal TMPDIR under system tmp
- t=${TMPDIR:-${TEMPDIR:-${TEMP:-${TMP:-${${TMPPREFIX%/zsh}:-/tmp}}}}}/.home-$LOGNAME
+ # NOTE: under proot with uid remapping, we can reuse old tmp, without
+ # worrying about permission issues; intended for proot under termux.
+ # XXX: _sev_proot_old_user only works if /tmp is shared!
+ t=${TMPDIR:-${TEMPDIR:-${TEMP:-${TMP:-${${TMPPREFIX%/zsh}:-/tmp}}}}}/.home-${_sev_proot_old_username:-$LOGNAME}
[[ -e $t ]] || mkdir -m700 $t 2>/dev/null
if [[ ! -d $t ]] {
# fallback TMPDIR to bare local directory or existing softlink