thefuck

Automatically corrects and executes mistyped console commands

brewmacoslinux
Try with needOr install directly
Source

About

Programmatically correct mistyped console commands

Commands

thefuck

Examples

Correct a misspelled git command$ cd /path/to/repo && git comit -m 'message' && thefuck
Fix a command with wrong syntax and execute the correction$ ls -lah /nonexistent/path && thefuck
Correct a typo in a package manager command$ brew isntall package-name && thefuck