ispell
Check spelling in text files
TLDR
Start an interactive session
Check for typos in the specified file and interactively apply suggestions
Display version
SYNOPSIS
ispell [options] file ...
PARAMETERS
-a
Run in batch mode. Prints misspelled words and suggestions to standard output, suitable for scripting rather than interactive use.
-l
List all misspelled words. Does not prompt for corrections; it simply prints each misspelled word on a new line.
-t
Assume input is in troff format. Skips troff requests and macros during the spell-checking process.
-n
Assume input is in nroff format. Similar to -t but designed for nroff documents, ignoring their specific formatting commands.
-x
Assume input is in LaTeX format. It intelligently skips LaTeX commands and environments, focusing only on the visible text content.
-b
Create a backup file. The original file is renamed with a .bak suffix before modifications are applied.
-d dictionary
Specify a main dictionary to use instead of the default. For example, -d en_US would specify the US English dictionary.
-p file
Specify a personal dictionary file to use. Words added by the user during a session are stored in this file.
-v
Display the version number of ispell and exit.
DESCRIPTION
The ispell command is a traditional interactive spell-checking program for Unix-like operating systems. It allows users to check text files for spelling errors against a main dictionary and optional personal dictionaries. When ispell encounters a word not found in its dictionaries, it presents the word to the user, offering a range of options such as: i (ignore the word), r (replace with a correction), a (add to personal dictionary), b (add to main dictionary if permissions allow), l (look up in dictionary), or R (replace with a suggestion).
It supports various languages through different dictionary files and can be used in different text formats (e.g., troff, nroff, LaTeX). While highly efficient and foundational, ispell has largely been superseded by more modern spell checkers like aspell or hunspell, primarily due to its limited Unicode support and less active development.
CAVEATS
ispell's primary limitation is its historical lack of robust Unicode support, which can cause issues with modern multi-language texts or complex character sets. It is also an older project, and while still functional, it is not as actively developed as more recent spell checkers like aspell or hunspell, which offer better linguistic features and wider character encoding support. Its interactive prompts can be less convenient in scripting contexts compared to its dedicated batch mode.
DICTIONARY FILES
ispell relies on language-specific dictionary files, typically found in a directory like /usr/lib/ispell/ or /usr/share/ispell/ on most Linux distributions. These files contain lists of correctly spelled words and rules for word formation. Users can also maintain personal dictionaries to store specialized vocabulary or words not present in the main dictionary, which helps tailor the spell checker to specific needs.
INTEGRATION WITH TEXT EDITORS
One of ispell's significant strengths throughout its active development was its widespread integration with text editors. Many prominent editors, including GNU Emacs and Vi/Vim (often via plugins), used ispell as their default backend for real-time or on-demand spell checking. This provided a seamless and efficient experience for developers, writers, and document creators within their editing environments.
HISTORY
ispell was originally created by Pace Willisson in 1983 as a replacement for the older Unix spell command. It quickly gained popularity for its interactive capabilities, allowing users to correct words on the fly and manage personal dictionaries. Its efficiency and modular design, particularly its dictionary format and affix compression, made it influential. For many years, ispell was the de facto standard spell checker on Unix-like systems and served as the backend for spell-checking features in popular text editors like Emacs and Vi. While development largely tapered off in the early 2000s, with GNU Aspell emerging as its modern spiritual successor addressing internationalization challenges, ispell remains available and functional on many systems, a testament to its enduring design.