| 1 | #!/bin/sh |
| 2 | |
| 3 | # Copyright (c) 2006 Don Stewart - http://www.cse.unsw.edu.au/~dons |
| 4 | # GPL version 2 or later (see http://www.gnu.org/copyleft/gpl.html) |
| 5 | |
| 6 | # |
| 7 | # Generic lambdabot binding |
| 8 | # |
| 9 | # Select the expression you want to refactor, on a line of its own, and |
| 10 | # in vim, type: |
| 11 | # !!bot cmd |
| 12 | # |
| 13 | # (Assuming your lambdabot is installed in $HOME/lambdabot, it will |
| 14 | # replace the expression with the pointfree version |
| 15 | # |
| 16 | |
| 17 | DECL=`cat` |
| 18 | cd $HOME/lambdabot/ |
| 19 | echo "$* $DECL" | ./lambdabot | sed '$d;s/lambdabot> //' |