
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
Hah... Bing'd it... Got me there for a second. :)
Thu, 06/20/2013 - 17:44
Thanks for this, was driving me insane.
Fri, 06/21/2013 - 01:47
Hi Jonas,
If you wish to kill autocorrect feature altogether, you can add the following line to your .zshrc file: DISABLE_CORRECTION="true"
Cheers!
Wed, 10/30/2013 - 09:30
This was driving me nuts, and I thought about killing the autocorrect feature, but now I don't have to! :)
Thu, 05/12/2016 - 04:48
What drives me crazy is:
> git config --list | grep ignore
zsh: correct 'config' to '.config' [nyae]?
Wed, 09/05/2012 - 16:44