summaryrefslogtreecommitdiff
path: root/rc/bin/spell
diff options
context:
space:
mode:
Diffstat (limited to 'rc/bin/spell')
-rwxr-xr-xrc/bin/spell21
1 files changed, 21 insertions, 0 deletions
diff --git a/rc/bin/spell b/rc/bin/spell
new file mode 100755
index 000000000..073ab2df2
--- /dev/null
+++ b/rc/bin/spell
@@ -0,0 +1,21 @@
+#!/bin/rc
+
+spellflags=()
+deroffargs=()
+fflag=''
+for(x){
+ switch($x){
+ case -[abcvx]
+ spellflags=($spellflags $x)
+ case -f
+ fflag=$x
+ case *
+ if(~ $fflag -f) {
+ spellflags=($spellflags -f $x)
+ fflag=''
+ }
+ if not deroffargs=($deroffargs $x)
+ }
+}
+
+deroff -w $deroffargs | sort -u | aux/sprog $spellflags