To use Aspell to spellcheck a file use:
aspell check [options] filename
at the command line where filename is the file you want to check and options is any number of optional options. Some of the more useful ones include:
none
, url
, email
, sgml
, tex
,
texinfo
, nroff
, among others. For more information on the
various modes see Notes on Various Filters and Filter Modes.
ultra
,
fast
, normal
, or bad-spellers
. For more
information on these modes see Notes on the Different Suggestion Modes.
For more information on the available options, please see Customizing Aspell.
For example to check the file foo.txt:
aspell check foo.txt
and to check the file foo.txt using the bad-spellers suggestion mode and the American English dictionary:
aspell check --sug-mode=bad-spellers -d en_US foo.txt
If the mode option is not given, then Aspell will use the extension of the file to determine the current mode. If the extension is .tex, then tex mode will be used, if the extension is .html, .htm, .php, or .sgml it will check the file in sgml mode, otherwise it will use url mode.
For more information on the various modes that can be used, see Notes on Various Filters and Filter Modes.
If Aspell was compiled with curses support and the TERM environment variable is set to a capable terminal type then Aspell will use a nice full screen interface, otherwise it will use a simpler “dumb” terminal interface where the misspelled word is surrounded by two '*'. In either case the interface should be self explanatory.
If Aspell is compiled with a version of the curses library that support wide characters then Aspell can also check UTF-8 text. Furthermore, the document will be displayed in the encoding defined by the current locale. This encoding does not necessarily have to be the same encoding that the document is in. This means that is is possible to check an 8-bit encoding such as ISO-8859-1 on an UTF-8 terminal. To do so simply set the encoding option to `iso-8859-1'. Furthermore it is also possible to check an UTF-8 document on an 8-bit terminal provided that the document can be successfully converted into that encoding.