Hacker News new | ask | show | jobs
by keeperofdakeys 4782 days ago
While zsh may be more 'useful', I find it a bit too smart. Many of the features are very interactive, and introduce a non-determinism that messes up my ability to fix errors. An example is command correction. I (usually) know when a command is wrong, and go to fix it without thinking. Being asked if you really meant some other command interferes with this, and while seemingly helpful, makes you wonder if a shell should really be doing that.

The directory listing shares the same problem. Once you have a list, it's just as easy to type the path then it's to cycle through the list (not that zsh stops this), it's just another interactive feature.

Then there is path-completion, which removes the / on the end of tab-completed paths. Since rsync treats a directory with / different to that without one, this feature annoys me to no end when using zsh.

I understand that all these are options, and could easily be configured. I just wonder how other people feel about them. Does anyone actively use these features? Do you find they can occasionally get in the way?

2 comments

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.

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!
I don't use them. But there are similar stupid features in bash which I also don't use. Configuring a shell seems normal to me.
I prefer not to configure much, the more I configure on my system, the harder it's to use another system (although, just using vim makes this hard on non-vim text editors.) Although I do find bash-completion handy in many situations (mainly for sub-commands), for mplayer it refuses to tab-complete videos not ending in a proper extension, which is rather annoying.

Don't get me wrong though, bash does have its bad points.