File: ispell

package info (click to toggle)
aspell 0.60.6-1
  • links: PTS
  • area: main
  • in suites: lenny
  • size: 10,000 kB
  • ctags: 4,862
  • sloc: sh: 48,145; cpp: 22,153; perl: 1,546; ansic: 1,535; makefile: 684; sed: 16
file content (32 lines) | stat: -rwxr-xr-x 988 bytes parent folder | download | duplicates (12)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/sh

# Ispell compatibility script for Aspell

# Uncomment this (remove the leading '#') to use the Ispell key
#   mapping when checking files with the "ispell command".
#CHECK_FLAGS="--keymapping=ispell"

command=""

for p 
do
  case $p in 
  -a|-A|-l|-c|-e*|-v*|-D) command=$p ;; 
  -*                    ) ;;
  *                     ) command=${command:="-"} ;;
  esac
done

case $command in
-A          ) echo "Aspell does not support the $command mode.";;
-a|-v*      ) exec aspell "$@" ;;
-l          ) shift; exec aspell list "$@" ;;
-c          ) shift; exec aspell munch "$@" ;;
-e          ) shift; exec aspell expand "$@" ;;
-e?         ) shift; exec aspell expand `expr "x$command" : '...\(.\)'` "$@" ;;
-D          ) shift; exec aspell dump affix "$@" ;;
"-"         ) exec aspell check $CHECK_FLAGS "$@" ;;
*           ) echo "Ispell compatibility script for Aspell."
              echo "Usage: $0 [options] -a|-l|-v[v]|-c|-e[1-4]|<file>"
              exit 1 ;;
esac