#! /bin/csh -f
# Learn the correct spelling of a word or words.
# Creates and maintains files
#    ~/lib/words   ... sorted text of words to suppliment standard list
#    ~/lib/hlista  ... supplimental and standard lists, merged and hashed
#    ~/lib/words.temp  ... scratch file
#    ~/lib/hlista.temp ... scratch file
# 
# I don't know why I need to make a copy of /usr/dict/hlista, but
# that's the only way I found to make it work. .. djones

# See also bad_word

echo $* | tr ' ' '\012' >> ~/lib/words
sort -u ~/lib/words > ~/lib/words.temp
mv ~/lib/words.temp ~/lib/words
cp /usr/dict/hlista ~/lib/hlista.temp
/usr/bin/spellin ~/lib/hlista.temp < ~/lib/words > ~/lib/hlista
rm ~/lib/hlista.temp
