| 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright (c) 2006 Don Stewart - http://www.cse.unsw.edu.au/~dons |
| 4 | # adapted by Gareth Smith |
| 5 | # GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) |
| 6 | |
| 7 | # |
| 8 | # A shell script to be called from vim, to use the awsesome power of haskell |
| 9 | # string processing in everyday editing. |
| 10 | # |
| 11 | # Select the line you want to edit, and in vim, type: |
| 12 | # !!run |
| 13 | # |
| 14 | # (Assuming your lambdabot is installed in $HOME/lambdabot) it will |
| 15 | # run the line as a haskell expression. |
| 16 | # |
| 17 | |
| 18 | DECL=`cat` |
| 19 | cd $HOME/lambdabot |
| 20 | echo "run $DECL" | ./lambdabot 2> /dev/null | sed '$d;/Irc/d;s/lambdabot> //' |
| 21 |