Changeset 849d452 in freewrt for package/mksh/patches
- Timestamp:
- May 3, 2013, 3:51:18 PM (13 years ago)
- Branches:
- freewrt_1_0, freewrt_2_0
- Children:
- 53fa986
- Parents:
- ee36332
- File:
-
- 1 edited
-
package/mksh/patches/patch-dot_mkshrc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
package/mksh/patches/patch-dot_mkshrc
ree36332 r849d452 3 3 • FreeWRT patches: 4 4 – no hostname(1) 5 – yofuh doesn’t like $? in $PS1 5 6 – ls(1) has no -o option 6 – yofuh doesn’t like $? in $PS17 7 • OpenWrt and FreeWRT-1.0 adjustment: 8 8 – since this is not ~/.mkshrc make sure subshells find it 9 9 10 --- mksh/dot.mkshrc~ 2013-0 4-05 15:40:17.000000000 +000011 +++ mksh/dot.mkshrc 2013-0 4-30 20:22:13.619440123+000012 @@ -2 2,13 +22,15 @@13 #-14 # ${ENV:-~/.mkshrc}: mksh initialisation file for interactive shells10 --- mksh/dot.mkshrc~ 2013-05-02 22:00:13.000000000 +0000 11 +++ mksh/dot.mkshrc 2013-05-03 13:46:54.016803654 +0000 12 @@ -28,13 +28,15 @@ case $KSH_VERSION in 13 *) return 0 ;; 14 esac 15 15 16 16 -PS1='#'; (( USER_ID )) && PS1='$'; [[ ${HOSTNAME:=$(ulimit -c 0; hostname -s \ … … 19 19 + )} = *([ ]|localhost) ]] && HOSTNAME=$(ulimit -c 0; hostname \ 20 20 2>/dev/null); : ${EDITOR:=/bin/ed} ${HOSTNAME:=nil} ${TERM:=vt100} 21 function precmd {21 : ${MKSH:=$(whence -p mksh)}; PS4='[$EPOCHREALTIME] '; PS1=$'\001\r''${| 22 22 local e=$? 23 23 24 - (( e )) && print -n"$e|"24 - (( e )) && REPLY+="$e|" 25 25 +# enable this back if you want the errorlevel in your prompt 26 26 +# this is default in upstream mksh, disabled locally in fwrt 27 +# (( e )) && print -n"$e|"28 # precmd is required to retain the errorlevel when ${ …;} is used29 return $e30 }31 @@ - 43,7 +45,7 @@ unalias ls27 +# (( e )) && REPLY+="$e|" 28 REPLY+=${USER:=$(ulimit -c 0; id -un 2>/dev/null || echo \?)} 29 REPLY+=@${HOSTNAME%%.*}: 30 31 @@ -50,7 +52,7 @@ unalias ls 32 32 alias l='ls -F' 33 33 alias la='l -a' … … 38 38 whence -p rot13 >/dev/null || alias rot13='tr \ 39 39 abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ \ 40 @@ - 373,4 +375,8 @@ alias cls='print -n \\033c'40 @@ -413,4 +415,8 @@ alias cls='print -n \\033c' 41 41 42 42 unset p
Note:
See TracChangeset
for help on using the changeset viewer.
