be0e40db82285b8af640dada008c6db01de0b189
[openwrt/svn-archive/archive.git] / utils / mksh / patches / 100-dot_mkshrc
1 $Id$
2
3 • Part of the FreeWRT patches:
4 – no hostname(1)
5 – ls has no -o
6 • OpenWrt fix:
7 – since this is not ~/.mkshrc make sure subshells find it
8
9 --- mksh/dot.mkshrc~ 2009-05-31 19:17:57.000000000 +0200
10 +++ mksh/dot.mkshrc 2009-06-12 17:37:18.000000000 +0200
11 @@ -20,7 +20,7 @@
12 #-
13 # ~/.mkshrc: mksh initialisation file for interactive shells
14
15 -: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
16 +: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
17 [[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
18 : ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi
19 function precmd {
20 @@ -38,7 +38,7 @@ unalias ls
21 alias l='ls -F'
22 alias la='l -a'
23 alias ll='l -l'
24 -alias lo='l -alo'
25 +alias lo='l -al'
26 alias which='whence -p'
27 whence -p rot13 >&- || alias rot13='tr \
28 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
29 @@ -283,4 +283,8 @@ function Lstripcom {
30 done; }
31 }
32
33 +# we need this in OpenWrt for subshells that are not login shells
34 +: ${ENV=/etc/mkshrc}
35 +[[ -z $ENV ]] || export ENV
36 +
37 : place customsations above this line