Hacker News new | ask | show | jobs
by SkyMarshal 4782 days ago
The command correction really bugs me in ZSH. 99% of the time it's wrong, and it doesn't learn even after the hundredth time of me telling it "no that's not what I meant, stick with the original". I keep thinking I should try writing a Bayesian filter for it or something, which would be a fun little project, but too low priority.

Also annoying when I start a command with sh, hit tab to command complete it with a .sh script in the current dir, and the command completion shows not just the .sh script but a bunch of shell commands as well. Pretty sure 'sh' should filter all those out and return only 'example.sh'. I don't recall this happening on bash.

Love all the plugins and things like oh-my-zsh, though.

1 comments

Maybe I'm just not enough of a 'power user,' but I've been using Zsh since 2008 ~ 2009, and I rarely encounter the command-correction. The couple of times I've had it invoked were times where it correctly fixed a typo.
It does fix typos for me too, but most of the time asks weird things like, I typed 'aptitude' did I mean '.aptitude'? It loves misinterpreting some of my commands as dotfiles. Huh?

Then again I have a knack for unintentionally breaking computers, so maybe I've done something in env or rc that's messed it up...

Using the following got rid of a lot of my correction woes:

    alias sudo="nocorrect sudo"
That is why you were getting the .aptitude one, you can use it for other commands that it gets the corrections wrong often.

I've since moved to vanilla bash+bash completion since it is everywhere and zsh completion seemed to annoy me more than help me.

Awesome, thank you!