logoalt Hacker News

zahlmanyesterday at 8:46 PM5 repliesview on HN

> I suppose I should finally clear this up: The autocorrect functionality I originally described here was a feature of the first Linux systems I ever used, so I assumed it was how every Linux system worked by default. Since then I've come to understand that it's a completely optional extra doodad.

What systems did this? I've never encountered one that I can recall.


Replies

ktm5jyesterday at 8:59 PM

I'm on my phone so I'm too lazy to dig for this, but I'm pretty sure they're talking about the bit of shell script that gets run if you type a command that isn't found in PATH.

Fedora and Debian will both dive straight into searching apt/dnf for a matching package and ask "do you want to install this?"

I imagine you could create a hook that gets run for any command failure, but again I'm on my phone so not sure.

show 3 replies
iguessthislldoyesterday at 8:58 PM

Zsh can suggest the corrections to commands and filename. I'm not sure if that's what they're talking about, but zsh has been around for awhile.

xg15yesterday at 10:31 PM

Wasn't there an article on here a while ago that this "autocorrect" had a bug and was actually supposed to trigger only after several seconds of no user input, not immediately?

dijityesterday at 8:59 PM

Anything that ships with a default zsh shell, which is a surprising number of distros actually.

show 1 reply
ninth_antyesterday at 9:05 PM

There are some bash options like cdspell or dirspell that are likely what the blog author is referring to.

Either that or they were using zsh with autocorrect preinstalled or had somehow rigged up the thefuck to execute and run on any error somehow? Either way seems like a terrible default.