lilalo

diff l3bashrc @ 71:d499fa3b2af1

Na lilalo@moskau.xt.vpn uspeshno zavelos i\
zarabotalo. + Sohranenie istorii pri vyhode
author devi
date Sat Feb 04 00:47:22 2006 +0200 (2006-02-04)
parents 6f5ad37fc8d9
children 0ffdebbccfce
line diff
     1.1 --- a/l3bashrc	Fri Feb 03 22:49:46 2006 +0200
     1.2 +++ b/l3bashrc	Sat Feb 04 00:47:22 2006 +0200
     1.3 @@ -21,6 +21,8 @@
     1.4  
     1.5  _l3_env()
     1.6  {
     1.7 +    trap _l3_close_session 2
     1.8 +    trap _l3_close_session EXIT
     1.9      true
    1.10  }
    1.11  
    1.12 @@ -35,8 +37,8 @@
    1.13  
    1.14  _l3_start_session()
    1.15  {
    1.16 -    L3_SESSION_ID=${L3_TTY##*/}-$$
    1.17 -    L3_HOME=~/.lilalo/
    1.18 +    export L3_SESSION_ID=${L3_TTY##*/}-$$
    1.19 +    export L3_HOME=~/.lilalo/
    1.20      mkdir -p $L3_HOME
    1.21  
    1.22      uname -a | grep -qi bsd && bsd=yes
    1.23 @@ -77,6 +79,10 @@
    1.24  
    1.25  _l3_close_session()
    1.26  {
    1.27 -    history > $L3_HOME/$L3_SESSION_ID.info
    1.28 +    ( 
    1.29 +        echo '<history>'
    1.30 +        history | sed 's/&/\&amp;/; s/</\&lt;/g; s/>/\&gt;/g'
    1.31 +        echo '</history>'
    1.32 +    ) >> $L3_HOME/$L3_SESSION_ID.info
    1.33  }
    1.34