GNU Aspell 0.60.8.2: Spellchecking Individual Files
Description: Aspell 0.60.8.2 spell checker user’s manual.

Next: Using Aspell as a Replacement for Ispell, Up: Basic Usage [Contents]

### 3.1 Spellchecking Individual Files

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:

–mode=mode

  the mode to use when checking files. The available modes are `none`, `url`, `email`, `markdown`, `html`, `tex`, `texinfo`, and `nroff`, among others. See Filter Options.

–dont-backup

  don’t create a backup file. Normally, if there are any corrections the Aspell utility will append `.bak` to the existing file name and then create a new file with corrections made during spell checking.

–sug-mode=mode

  the suggestion mode to use where mode is one of `ultra`, `fast`, `normal`, `slow`, or `bad-spellers`. See Notes on the Different Suggestion Modes.

–lang=name/-l name

  the language the document is written in. The default depends on the current locale.

–encoding=name

  encoding the document is expected to be in. The default depends on the current locale.

–master=name/-d name

  the main dictionary to use.

–keymapping=name

  the keymapping to use. Either `aspell` for the default mapping or `ispell` to use the same mapping that the Ispell utility uses.

(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 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.

Next: Using Aspell as a Replacement for Ispell, Up: Basic Usage [Contents]