xref: /plan9/rc/bin/spell (revision 59cc4ca53493a3c6d2349fe2b7f7c40f7dce7294)
1#!/bin/rc
2
3spellflags=()
4deroffargs=()
5fflag=''
6for(x){
7	switch($x){
8	case -[abcvx]
9		spellflags=($spellflags $x)
10	case -f
11		fflag=$x
12	case *
13		if(~ $fflag -f)	{
14			spellflags=($spellflags -f $x)
15			fflag=''
16		}
17		if not		deroffargs=($deroffargs $x)
18	}
19}
20
21deroff -w $deroffargs | sort -u | aux/sprog $spellflags
22