lilalo
diff l3bashrc @ 110:2fc1f3f08760
fix
author | igor |
---|---|
date | Wed Feb 13 02:43:33 2008 +0200 (2008-02-13) |
parents | 54fbf2041159 |
children | 99ea38e538c9 |
line diff
1.1 --- a/l3bashrc Fri Aug 04 18:06:09 2006 +0300 1.2 +++ b/l3bashrc Wed Feb 13 02:43:33 2008 +0200 1.3 @@ -151,11 +151,9 @@ 1.4 old_file=\"/tmp/l3-saved-\$\$.\$RANDOM.\$RANDOM\" 1.5 /bin/cp -- \"\$1\" \"\$old_file\" 2> /dev/null 1.6 $editor_file \"\$@\" || ERR=\$? 1.7 - [ -e \"\$old_file\" ] && diff \"\$old_file\" \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null 1.8 - if [ "$?" == 2 ] 1.9 - then 1.10 - diff /dev/null \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null 1.11 - fi 1.12 + [ -e \"\$old_file\" ] \ 1.13 + && diff -u \"\$old_file\" \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null \ 1.14 + || diff -u /dev/null \"\$1\" > \"\$L3_HOME/\$DIFFNAME\" 2> /dev/null 1.15 /bin/rm \"\$old_file\" 2> /dev/null 1.16 return \$ERR 1.17 fi 1.18 @@ -238,8 +236,26 @@ 1.19 grep ^l3cd= ~/.l3rc | sed s/[^=]*=// 1.20 ;; 1.21 *) 1.22 - echo /usr/local/bin/l3 1.23 + cat <<EOF 1.24 +l3 [command]: 1.25 + 1.26 + cd new_context - change current lilalo context 1.27 + pwd - show current lilalo context 1.28 + on - switch writing on (NOT IMPLEMENTED YET) 1.29 + off - switch writing off (NOT IMPLEMENTED YET) 1.30 + 1.31 +EOF 1.32 ;; 1.33 esac 1.34 } 1.35 1.36 +l3cd() 1.37 +{ 1.38 + l3 cd "$@" 1.39 +} 1.40 + 1.41 +l3pwd() 1.42 +{ 1.43 + l3 pwd 1.44 +} 1.45 +