aspell is an interactive spell checker. It scans your files (or anything from standard input), check for misspellings, and allow you to correct the words interactively.

Syntax

aspell [options] command

Commands

command can be one of the following:

  • Syntax
  • Configuration
  • Examples
  • Related commands
  • Linux commands help

Options

The following options can control which dictionaries to use and how they behave:

The following options control the behavior of aspell when checking documents:

These options modify the behavior of the various filters:

The following options may be used to control the behavior of run-together words:

The following are miscellaneous options that don’t fall under any other category:

The following options are part of the aspell utility and work independently of the library:

If aspell is run without any command line options, it displays a brief help screen and quits.

Configuration

aspell can accept options via global or personal configuration files so that you do not need to specify them each time at the command line.

The default global configuration file is /etc/aspell.conf (or another file, specified by option –conf), and is checked first.

The default per-user configuration file ~/.aspell.conf located in the $HOME directory (or another file, specified by option –per-conf) is checked next and overrides options set in the global config file. Options specified at either the command line or via an environmental variable override those specified by either configuration file.

Each line of the configuration file has the format:

option [value]

…where option is any one of the standard library options above without the leading dashes. For example, the following line sets the default language to Swiss German:

lang de_CH

There may be any number of spaces between the option and the value, however, it can only be spaces, i.e., there is no ‘=’ between the option name and the value. Comments may also be included by preceding them with a ‘#’ as anything from a ‘#’ to a newline is ignored. Blank lines are also allowed. The /etc/aspell.conf file is a good example of how to set these options.

Examples

aspell check example.txt

Running this command checks the spelling of every word in the file example.txt. If no spelling errors are found, the command returns nothing. If it detects any spelling errors, it highlights them in context and display your options.

For example, if example.txt contained the following text:

The quirck brown fox jumped over the extraordinarily lazy dog.

…then the menu that aspell gives you would resemble the following:

The quirck brown fox jumped over the extraordinarily lazy dog.

  1. quick 6) quirks
  2. quirk 7) quicker
  3. quirky 8) quickie
  4. quack 9) Kirk
  5. quark 0) kick i) Ignore I) Ignore all r) Replace R) Replace all a) Add l) Add Lower b) Abort x) Exit

spell — A spell checker.