source: freewrt/package/mksh/patches/patch-dot_mkshrc@ 56bb70d

freewrt_1_0 freewrt_2_0
Last change on this file since 56bb70d was 56bb70d, checked in by Thorsten Glaser <tg@…>, 18 years ago

tentatively upgrade to mksh R31d

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@3598 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 1.2 KB
Line 
1$FreeWRT$
2
3 • FreeWRT patches:
4 – no hostname(1)
5 – ls has no -o
6 – yofuh doesn’t like $? in $PS1
7
8--- mksh.orig/dot.mkshrc Tue Oct 2 01:03:12 2007
9+++ mksh/dot.mkshrc Mon Oct 15 09:32:00 2007
10@@ -24,13 +24,15 @@
11 #-
12 # sample mksh initialisation file for interactive shells
13
14-: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(ulimit -c 0;hostname -s 2>&-)}
15+: ${EDITOR:=/bin/ed} ${TERM:=vt100} ${HOSTNAME:=$(</proc/sys/kernel/hostname)}
16 [[ $HOSTNAME = @(localhost|*([ ])) ]] && HOSTNAME=$(ulimit -c 0;hostname 2>&-)
17 : ${HOSTNAME:=nil}; PS1='#'; [[ "$(ulimit -c 0; id -u 2>&-)" -eq 0 ]] || PS1='$'
18 function precmd {
19 typeset -i10 e=$?
20
21- (( e )) && print -n -- "$e|"
22+# enable this back if you want the errorlevel in your prompt
23+# this is default in upstream mksh
24+# (( e )) && print -n -- "$e|"
25 }
26 PS1='$(precmd)${USER:=$(ulimit -c 0;id -un 2>&- || print \?)}@${HOSTNAME%%.*}:$(
27 typeset pfx=~ wd=${PWD:-?}
28@@ -50,7 +52,7 @@ export EDITOR HOSTNAME LESSHISTFILE=- MK
29 alias l='/bin/ls -F'
30 alias la='l -a'
31 alias ll='l -l'
32-alias lo='la -lo'
33+alias lo='la -l'
34 alias which='whence -p'
35 whence -p rot13 >&- || alias rot13='tr [A-Za-z] [N-ZA-Mn-za-m]'
36 whence -p hd >&- || function hd {
Note: See TracBrowser for help on using the repository browser.