Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh overzealously trying to correct feature to features

Tags:

git

git-flow

zsh

I am using git and zsh. Our boss is using git-flow. Zsh keeps asking me if I mistyped 'features' as 'feature'. A colleague stopped using zsh out of fury for this very reason, we must fix this problem to bring him back into the light of zsh!

rainbow@pony:~/ruby-project-9000 (*) (!)
> git push origin feature/power_level
zsh: correct 'feature/power_level' to 'features/power_level' [nyae]? n

Update: disable autocorrect completely

It was just correct_all, as in the accepted answer, but the syntax for disabling zsh autocorrect varies over its updates. The following should be a catch all:

source $ZSH/oh-my-zsh.sh
DISABLE_CORRECTION="true"
unsetopt correct
unsetopt correct_all

DISABLE_CORRECTION="true" - is currently what works for me, learned from here


Update: disabling autocorrect for specific commands

To specifically disable it autocorrecting commands, but unfortunately not "features" as it is a directory (thanks answers below!), see this solution for exempting commands

like image 339
xxjjnn Avatar asked Jan 04 '13 17:01

xxjjnn


1 Answers

Turn off feature completely:

unsetopt correct_all
like image 190
Zabba Avatar answered Sep 28 '22 05:09

Zabba