ispell-wrapper
Spell-check files using ispell
SYNOPSIS
ispell-wrapper [ispell-options] [files]
PARAMETERS
All ispell(1) options
Every option accepted by ispell(1) is passed unchanged to the ispell binary.
Key examples:
• -a: List misspelled words (batch mode).
• -B: Consider capitalized words as uppercase.
• -c: Catch exceptions (interactive).
• -d dict: Use specific dictionary (overrides locale).
• -l: List misspelled words only.
• -t: TeX/LaTeX mode.
• -W [num]: Auto-correct after num errors.
Full list in ispell(1).
DESCRIPTION
Ispell-wrapper is a lightweight shell script that serves as a drop-in replacement for the traditional ispell command on Linux systems, particularly in Debian and derivatives. Its primary function is to automatically select the appropriate dictionary and affix files based on the user's current locale, determined from environment variables like LANG or LC_MESSAGES. This eliminates manual dictionary specification, making multilingual spell checking seamless.
The script derives the dictionary identifier from the locale by replacing underscores ('_') with hyphens ('-') and removing codeset (e.g., '.UTF-8') and modifier (e.g., '@euro') components. For instance, de_DE.utf8@euro maps to de-de, while en_GB uses en-gb. It searches for dictionary files with extensions .hash, .rhash, .mw, or .rmw in /var/lib/ispell/<language>/, prioritizing the first found. Affix files are located in /var/lib/ispell/<language>.aff or /usr/share/ispell/<language>.aff.
All command-line options and arguments are transparently forwarded to the underlying ispell process, preserving full compatibility. This makes ispell-wrapper ideal for integration with text editors (e.g., Vim's :spell, Emacs' Flyspell), scripts, or any tool relying on ispell. It enhances usability in international settings by reducing setup errors and configuration time, though it requires pre-installed language packs via package managers like ispell-<language>.
CAVEATS
Fails if no matching dictionary/affix files exist for the locale in /var/lib/ispell/; install via apt install ispell-<language>. No explicit fallback to English—check logs for errors. Not suitable for systems without ispell installed.
LOCALE MAPPING
E.g., de_DE@euro → de-de dict; en_GB.UTF-8 → en-gb.
SEARCH PATHS
Dicts: /var/lib/ispell/<lang>/{.hash,.rhash,.mw,.rmw}.
Affix: /var/lib/ispell/<lang>.aff or /usr/share/ispell/<lang>.aff.
HISTORY
Introduced in Debian Linux to support i18n spell checking with ispell. Manual page authored by Matthias Julius (<[email protected]>). Evolved alongside ispell (orig. by Walt Taylor, 1980s) for modern multilingual use.


