This isn't exactly a duplicate, as I want correct_all still active. I do mess up arguments from time to time and ZSH is happy to help me. The rub happens when I am in my home directory and I want to manage sshd with something like systemctl reload ssh
or service ssh start
it always asks me if I want to correct to .ssh
. I usually perform my work in $HOME
so this gets rather annoying. I have already tried alias ssh='nocorrect ssh'
and alias ssh='nocorrectall ssh'
(which I don't think does anything). Any ideas on how to solve this?
Stop ZSH from trying to correct ssh to .ssh as an argument
autocorrectionzsh
Best Answer
Set
CORRECT_IGNORE_FILE
. For example to ignore corrections on all dot files:This is documented in
zshall(1)
this requires a somewhat recent version of
zsh
(one more recent than ships with Centos 7). If you're stuck on an old version ofzsh
you'll need to either disableCORRECT_ALL
or usenocorrect
to turn the corrections off for each problematical command (which is probably whyCORRECT_IGNORE_FILE
was added).