2009-06-12 20:24:16 +00:00
|
|
|
|
$Id$
|
2008-07-05 12:25:32 +00:00
|
|
|
|
|
2009-06-12 20:24:16 +00:00
|
|
|
|
• Part of the FreeWRT patches:
|
2008-07-05 12:25:32 +00:00
|
|
|
|
– no hostname(1)
|
|
|
|
|
– ls has no -o
|
2009-06-12 20:24:16 +00:00
|
|
|
|
• OpenWrt fix:
|
|
|
|
|
– since this is not ~/.mkshrc make sure subshells find it
|
2008-07-05 12:25:32 +00:00
|
|
|
|
|
2009-06-12 20:24:16 +00:00
|
|
|
|
--- mksh/dot.mkshrc~ 2009-05-31 19:17:57.000000000 +0200
|
|
|
|
|
+++ mksh/dot.mkshrc 2009-06-12 17:37:18.000000000 +0200
|
|
|
|
|
@@ -20,7 +20,7 @@
|
|
|
|
|
#-
|
|
|
|
|
# ~/.mkshrc: mksh initialisation file for interactive shells
|
2008-07-05 12:25:32 +00:00
|
|
|
|
|
2007-07-23 14:04:39 +00:00
|
|
|
|
-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
|
|
|
|
|
+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
|
|
|
|
|
[[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
|
2009-06-12 20:24:16 +00:00
|
|
|
|
: ${HOSTNAME:=nil}; if (( USER_ID )); then PS1='$'; else PS1='#'; fi
|
2008-07-05 12:25:32 +00:00
|
|
|
|
function precmd {
|
2009-06-12 20:24:16 +00:00
|
|
|
|
@@ -38,7 +38,7 @@ unalias ls
|
2008-07-05 12:25:32 +00:00
|
|
|
|
alias l='ls -F'
|
2007-03-16 20:47:13 +00:00
|
|
|
|
alias la='l -a'
|
|
|
|
|
alias ll='l -l'
|
2008-07-05 12:25:32 +00:00
|
|
|
|
-alias lo='l -alo'
|
|
|
|
|
+alias lo='l -al'
|
2007-07-23 14:04:39 +00:00
|
|
|
|
alias which='whence -p'
|
2008-07-05 12:25:32 +00:00
|
|
|
|
whence -p rot13 >&- || alias rot13='tr \
|
|
|
|
|
abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \
|
2009-06-12 20:24:16 +00:00
|
|
|
|
@@ -283,4 +283,8 @@ function Lstripcom {
|
|
|
|
|
done; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
+# we need this in OpenWrt for subshells that are not login shells
|
|
|
|
|
+: ${ENV=/etc/mkshrc}
|
|
|
|
|
+[[ -z $ENV ]] || export ENV
|
|
|
|
|
+
|
|
|
|
|
: place customsations above this line
|