Metal Toad has been building applications and cloud environments for some of the most well-known global brands for over a decade. Learn more > >

Quick Tip: Stop ZSH Shell Auto-Correct from Driving You Crazy

I switched my Unix shell to zsh a few months ago and overall I love it. But sometimes the autocorrect can be a little *too* helpful.

After the latest upgrade I started getting this every time I typed 'git status':

zsh: correct 'status' to 'stats' [nyae]?

Um no. No thanks I said. Not today. WILL YOU QUIT ASKING ME THAT!?!?

So I finally Bing'd* it and got the suggestion to turn off auto correct. That seemed a little drastic. Here's a less blunt solution: Open .oh-my-zsh/lib/correction.zsh and add this line to it:

alias git status='nocorrect git status'

You may now commune with git in peace.

You're welcome.

*Nah, I used Google. :) Just wanted to see if you were paying attention.

Comments

This was driving me nuts, and I thought about killing the autocorrect feature, but now I don't have to! :)

What drives me crazy is:
> git config --list | grep ignore
zsh: correct 'config' to '.config' [nyae]?

Add new comment

Restricted HTML

  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id>
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <cpp>, <java>, <php>. The supported tag styles are: <foo>, [foo].
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Ready to get started?