accomodate stupid Slackware 11 (if you're a slack user, pity you)

This commit is contained in:
tg 2007-06-20 13:38:18 +00:00
parent e596de4759
commit 3a563948ec

View File

@ -1,8 +1,8 @@
: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
[[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
PS1='# '; [[ "$(ulimit -c 0; id -u 2>&-)" -eq 0 ]] || PS1='$ '
: ${HOSTNAME:=nil}; PS1='#'; [[ "$(ulimit -c 0; id -u 2>&-)" -eq 0 ]] || PS1='$'
PS1='$(((e = $?)) && print $e\|)${USER:=$(ulimit -c 0; id -un 2>&- || \
print nobody)}@${HOSTNAME:=nil}:$(typeset pfx=~ wd=${PWD:-$(builtin pwd)}
print nobody)}@${HOSTNAME%%.*}:$(typeset pfx=~ wd=${PWD:-$(builtin pwd)}
typeset -i n=${COLUMNS:-80}/3; let n="n < 7 ? 7 : n"
[[ ${wd#$pfx} = $wd || $pfx = ?(/) ]] || wd=\~${wd#$pfx}
pfx=; while (( (${#pfx} + ${#wd}) > n )); do
@ -13,7 +13,7 @@ PS1='$(((e = $?)) && print $e\|)${USER:=$(ulimit -c 0; id -un 2>&- || \
pfx=...
wd=${wd#?????}
fi
done; print -r -- "$pfx$wd") '$PS1
done; print -r -- "$pfx$wd") '"$PS1 "
export EDITOR HOSTNAME MKSH=$(whence -p mksh) PS1 TERM USER
alias l='/bin/ls -F'
@ -38,4 +38,4 @@ function Lstripcom {
# place customisations between this line and the “: RCSID” line below
: $MirOS: src/bin/mksh/dot.mkshrc,v 1.16 2007/06/15 22:00:00 tg Rel $
: $MirOS: src/bin/mksh/dot.mkshrc,v 1.17 2007/06/20 13:38:18 tg Exp $