1#compdef ispell buildhash munchlist findaffix tryaffix icombine ijoin
2
3case "$service" in
4ispell)
5  _arguments -s \
6    '(-n -h)-t[input file is in TeX/LaTeX format]' \
7    '(-t -h)-n[input file is in nroff/troff format]' \
8    '(-n -t)-h[input file is in HTML format]' \
9    '(-x)-b[create backup file]' \
10    '(-b)-x[don'"'"'t create backup file]' \
11    '(-C)-B[report run-together words as errors]' \
12    '(-B)-C[take run-together words as compounds]' \
13    '-P[don'"'"'t generate extra root/affix combinations]' \
14    '-m[make possible root/affix combinations]' \
15    '-S[sort guesses by probable correctness]' \
16    '-d[specify alternate dictionary file]:dictionary file:_files' \
17    '-p[specify alternate personal dictionary file]:personal dictionary file:_files' \
18    '-w[specify additional word characters]:word characters:' \
19    '-W[specify length of legal words]:length of legal words:' \
20    '-T[specify formatter type]:formatter type:(nroff mm ms me man NeXT tex bib)' \
21    '(-N)-M[show menu]' \
22    '(-M)-N[don'"'"'t show menu]' \
23    '-L-[specify number of context lines to show]:number of context lines:' \
24    '-V[show non-7-bit characters escaped]' \
25    '-l[produce list of misspelled words on stdout]' \
26    '-s[stop after each line of input (SIGTSTP)]' \
27    '-f[specify output file name]:output file:_files' \
28    '(-A)-a[single line input/output mode]' \
29    '(-a)-A[single line input/output mode (with include-files)]' \
30    '(-e)-c[produce list of possible root words and affixes]' \
31    '(-c)-e-[expand affix flags]::expansion level:((1\:normal 2\:append\ prepend\ original\ root/affix\ combination 3\:output\ multiple\ lines 4\:append\ root\ length\ ratios))' \
32    '-D[dump affix tables]' \
33    '*-v[show version]' \
34    ':file to spell-check:_files'
35  ;;
36buildhash)
37  _arguments \
38    '(-c)-s[silent operation]' \
39    '(: -s)-c[count mode]:count: :affix file:_files -g "*.(#i)aff(-.)"' \
40    ':raw dictionary file:_files:' \
41    ':affix file:_files -g "*.(#i)aff(-.)"' \
42    ':hashed output file:_files "*.(#i)hash(-.)"'
43  ;;
44munchlist)
45  _arguments -s \
46    '-l[specify affix file]:affix file:_files -g "*.(#i)aff(-.)"' \
47    '-c[specify converted output file name]:converted file name:_files' \
48    '-T[specify string character type]:string character type:' \
49    '-s[specify strip hash file]:hash file:_files "*.(#i)hash(-.)"' \
50    '-D[debug mode]' \
51    '-v[verbose mode]' \
52    '-w[specify additional word characters]:word characters:' \
53    '*:dictionary file:_files'
54  ;;
55findaffix)
56  _arguments -s \
57    '(-s)-p[search possible prefixes]' \
58    '(-p)-s[search possible suffixes]' \
59    '-f[sort affixes by frequency]' \
60    '-c[clean output]' \
61    '-m[specify minimum affix length]:minimum affix length:' \
62    '-M[specify maximum affix length]:maximum affix length:' \
63    '-e[specify header/trailer length of suppressed affixes]:header/trailer length of suppressed affixes:' \
64    '-t[specify field separator character]:field separator character:' \
65    '-l[specify minimum occurrence count]:minimum occurrence count:' \
66    '*:dictionary file:_files'
67  ;;
68tryaffix)
69  _arguments -s \
70    '(-s)-p[estimate effectiveness of prefix]' \
71    '(-p)-s[estimate effectiveness of suffix]' \
72    '-c[write only summary of the results]' \
73    ':expanded dictionary file:_files:' \
74    '*:affix and optional addition:'
75  ;;
76icombine)
77  _arguments \
78    '-T[specify string character type]:string character type:' \
79    ':affix file:_files -g "*.(#i)aff(-.)"'
80  ;;
81ijoin)
82  _arguments -s \
83    '(-u)-s[use signed comparison]' \
84    '(-s)-u[use unsigned comparison]' \
85    '-a[print lines for unpairable lines and normal output]:file number:(1 2)' \
86    '-v[print lines for unpairable lines instead of normal output]:file number:(1 2)' \
87    '-e[specify replacement string]:replacement string:' \
88    '-o[specify output field list]:output field list:' \
89    '-t[specify field separator character]:field separator character:' \
90    '(-1 -2)-j-[specify join file and field]:file number:(1 2):field number:' \
91    '(-j)-1[specify join field]:field number:' \
92    '(-j)-2[specify join field]:field number:' \
93    ':first input file:_files' \
94    ':second input file:_files'
95  ;;
96esac
97