diff options
author | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-14 17:27:24 +0000 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@localhost> | 2011-04-14 17:27:24 +0000 |
commit | a150899221a5badff9740703b754f901b4f52762 (patch) | |
tree | 3d6911874b0ee763e40490d04f56fc09d89ccfa6 /acme/bin/aspell | |
parent | 71cfa9c637386ebe00fc6d1bf6215db6657559f4 (diff) | |
download | plan9front-a150899221a5badff9740703b754f901b4f52762.tar.xz |
fill /acme
Diffstat (limited to 'acme/bin/aspell')
-rwxr-xr-x | acme/bin/aspell | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/acme/bin/aspell b/acme/bin/aspell new file mode 100755 index 000000000..7adbd148f --- /dev/null +++ b/acme/bin/aspell @@ -0,0 +1,43 @@ +#!/bin/rc + +spellflags=() +fflag='' +for(x){ + switch($x){ + case -[bcvx] + spellflags=($spellflags $x) + case -f + fflag=$x + case * + if(~ $fflag -f) { + spellflags=($spellflags -f $x) + fflag='' + } + if not args = ($args $x) + } +} + +dir = /mnt/wsys +if(! test -f $dir/cons) + dir = /mnt/term/$dir +id=`{cat $dir/new/ctl} +id=$id(1) + +if(~ $#args 1 && ~ $args /*){ + adir = `{basename -d $args} + args = `{basename $args} + echo 'name '^$adir^/-spell > $dir/$id/ctl + cd $adir +} +if not { + echo 'name '^`{pwd}^/-spell > $dir/$id/ctl +} + +{ + echo noscroll + if(~ $#args 0) + /acme/bin/$cputype/spout | sort -t: -u +2 | sort -t: +1.1n | aux/sprog -a $spellflags > $dir/$id/body + if not for(i in $args) + /acme/bin/$cputype/spout $i | sort -t: -u +2 | sort -t: +1.1n | aux/sprog -a $spellflags > $dir/$id/body + echo clean +}> $dir/$id/ctl |