fspell
raw| 1 | #!/bin/sh |
| 2 | TMPFILE=`mktemp -q ${TMPDIR:-/tmp}/fspell.XXXXXX` |
| 3 | if [ "$?" -eq "0" ]; then |
| 4 | cat > $TMPFILE |
| 5 | # Unfortunatelly trapping errors doesn't work when called from vim |
| 6 | trap 'cat $TMPFILE; exit 0' 1 2 13 15 |
| 7 | ispell -d czech $TMPFILE < /dev/tty > /dev/tty |
| 8 | cat $TMPFILE |
| 9 | rm -f $TMPFILE |
| 10 | exit 0 |
| 11 | else |
| 12 | cat |
| 13 | fi |
| 14 | exit 0 |