Skip to content
Simple tool for fixing common misspellings, typos
Shell Makefile Perl
Find file
Latest commit dc734dc @vlajos Merge pull request #13 from szepeviktor/patch-1
Visible title in README
Failed to load latest commit information.
dict add initilized fixes #11
test Fix expected test result.
.travis.yml use new kcov feature to upload report directly to
LICENSE date fix
Makefile circle ci support Visible title in README
circle.yml circle ci support
misspell_fixer_gb_to_us.sed Use the same shell in normal mode instead of forking a new one. Compr…
misspell_fixer_not_so_safe.sed Use the same shell in normal mode instead of forking a new one. Compr…
misspell_fixer_safe.0.sed Avoid changing 'successfully' to 'successfuly'
misspell_fixer_safe.1.sed Frequency based separation of rules, Doc tweaks
misspell_fixer_safe.2.sed add initilized fixes #11

Misspell Fixer

Build Status Coverage Status Circle CI Build Status Gratipay

Utility to fix common misspellings, typos in source codes. There are lots of typical misspellings in program codes. Typically they are more eye-catching in the living code but they can easily hide in comments, examples, samples, notes and documentations. With this utility you can fix a large number of them very quickly.

Be aware that the utility does not check or fix file names. It can easily happen that a misspelled word is fixed in a file name in a program's code, but the file itself will not be renamed by this utility.

And also important to note to be extra careful when fixing public APIs!

A manual review is always needed to verify that nothing has been broken.


misspell_fixer  [OPTION] target

Options, Arguments

target can be any file or directory.

  • -d Debug mode: shows the core logics all steps
  • -v Verbose mode: shows the iterated files
  • -r Real run mode: Overwrites the original files with the fixed one. Without this option the originals will be untouched.
  • -f Fast mode: Faster mode with limited options. (-v, -s options are not supported) Works only with real run mode -r. This mode cannot make backups. (-n is also needed)
  • -s Shows diffs of changes.
  • -i Walk through source code management system's internal directories. (don't ignore *.svn*, *.git*)
  • -b Process binary files. (don't ignore *.gif, *.jpg, *.png, *.zip, *.gz, *.bz2, *.rar)
  • -n Disabling backups. (By default the modified files' originals will be saved with the .$$.BAK suffix.)
  • -N Enable file name filtering. For example: -N '*.cpp' -N '*.h'
  • -P Enable parallelism. For example: -P 4 processes the files in 4 thread. (Supported only in fast mode.)
  • -h Help. Displays this page.

By default only a subset of rules are enabled (around 100). You can enable more rules with the following options:

  • -u Enabling less safe rules. (Manual revise's need will be more probable.) (Around ten rules.)
  • -g Enabling rules to convert British English to US English. (These rules aren't exactly typos but sometimes they can be useful.) (Around ten rules.)
  • -R Enabling rare rules. (Few hundred rules.)
  • -V Enabling very rare rules. (Mostly from the wikipedia article.) (More than four thousand rules.)

The processing speed decreases as you activate more rules.

Sample usages

By default nothing important will happen

$ target

What you can track with -v

$ -v target

A real usage:

$ -r -v target

Show only the diff, don't modify the files:

$ -s -v target

Show everything and fix the files:

$ -r -s -v target

Fast mode example:

$ -r -f -n target

Fast mode example with mass processing:

$ -frnR -P4 target

It is based on the following sources for common misspellings:


  • bash
  • find
  • sed
  • diff
  • xargs (for parallelism)


Veres Lajos

Original source

Feel free to use!

Something went wrong with that request. Please try again.