Live data from Hacker News

Zsh is your friend.

mikegrouchy.com

1–10 of 117 posts

Re: Zsh is your friend.

#2
+1 for actually giving me a couple reasons to try zsh. Of course I'd be surprised if many of these features aren't already hacked into some bash guru's dotfiles but, that said, more autocompletions without writing them myself is always nice.

Re: Zsh is your friend.

#3
While from what I have read about it zsh is a nice shell, it doesn't deal with what I find to be the biggest problem with bash, sh, and just about every shell that isn't fish: the horribly ugly and inconsistent syntax. And I think it's rather sad that on what is supposedly the most advanced shell of our generation, you still have to deal with a thousand ridiculous redirections and quoting styles, different delimiter keywords for every control structure ("fi?" "done?" "esac?" Why not just freaking "end?"), and rules for expanding variables that come back to bite you in the rear whenever you have spaces, quote characters, or anything besides a run of letters, numbers, and a select few punctuation marks in your filenames or other variables.

Re: Zsh is your friend.

#4

While from what I have read about it zsh is a nice shell, it doesn't deal with what I find to be the biggest problem with bash, sh, and just about every shell that isn't fish: the horribly ugly and inconsistent syntax. And I think it's rather sad that on what is supposedly the most advanced shell of our generation, you still have to deal with a thousand ridiculous redirections and quoting styles, different delimiter…

I think your complaining more about shell scripting rather than the terminal use itself.

Re: Zsh is your friend.

#5
Funnily enough, I find that the autocorrection tends to get in my way more often than not. Being prompted if I meant 'git' when I type 'gut' interrups my thinking flow, while 'command not found' doesn't. And the autocorrect is very bad for cp/mv ('mv test test1' will likely ask me if I meant 'test' instead of 'test1').

That being said, I'm a happy zsh user, for all it provides. Autocorrection is just one of the only things that, in my opinion, don't work well, so it's strange to market them.

Re: Zsh is your friend.

#6

While from what I have read about it zsh is a nice shell, it doesn't deal with what I find to be the biggest problem with bash, sh, and just about every shell that isn't fish: the horribly ugly and inconsistent syntax. And I think it's rather sad that on what is supposedly the most advanced shell of our generation, you still have to deal with a thousand ridiculous redirections and quoting styles, different delimiter…

Once you learn the zen of shell script, like any programming language, those problems pretty much go away. Shell script is a tiny language packed with features and can be learned through constant use in a week, but like any language, it takes time to master.

It's incredibly powerful for interactive use and data manipulation combined with the standard Unix tools and sometimes pulling out perl or python is more work than just banging out a pipeline on the command line.

Quoting does take some time, but just remember that when in double to quote your variable expansions with double quotes. There's more too it, but that's a good rule to start with.

Re: Zsh is your friend.

#7

While from what I have read about it zsh is a nice shell, it doesn't deal with what I find to be the biggest problem with bash, sh, and just about every shell that isn't fish: the horribly ugly and inconsistent syntax. And I think it's rather sad that on what is supposedly the most advanced shell of our generation, you still have to deal with a thousand ridiculous redirections and quoting styles, different delimiter…

The thing I like about fish is the easy history nav. I type "git" and press Up, and I get to go through my history of anything that started with "git" very quickly. I'll often remember I typed an svn command three weeks ago, but forget the parameters, and I'll have it back within 15 seconds.

It's like magic!

Re: Zsh is your friend.

#8
post #5

Funnily enough, I find that the autocorrection tends to get in my way more often than not. Being prompted if I meant 'git' when I type 'gut' interrups my thinking flow, while 'command not found' doesn't. And the autocorrect is very bad for cp/mv ('mv test test1' will likely ask me if I meant 'test' instead of 'test1'). That being said, I'm a happy zsh user, for all it provides. Autocorrection is just one of the only…

[deleted]

Re: Zsh is your friend.

#9
post #5

Funnily enough, I find that the autocorrection tends to get in my way more often than not. Being prompted if I meant 'git' when I type 'gut' interrups my thinking flow, while 'command not found' doesn't. And the autocorrect is very bad for cp/mv ('mv test test1' will likely ask me if I meant 'test' instead of 'test1'). That being said, I'm a happy zsh user, for all it provides. Autocorrection is just one of the only…

    setopt correct              # try to correct spelling...
    setopt no_correctall        # ...only for commands, not filenames
https://github.com/samsonjs/config/blob/master/zsh/zshrc#L11...

[...]

    alias cp='nocorrect cp'            # don't correct spelling for 'cp'
    alias mkdir='nocorrect mkdir'      # don't correct spelling for 'mkdir'
    alias mv='nocorrect mv'            # don't correct spelling for 'mv'
https://github.com/samsonjs/config/blob/master/zsh/zshrc#L20...

Re: Zsh is your friend.

#10
Due to the poor spelling and grammar, gross oversimplification of zsh's advantages, and the inclusion of oh-my-zsh as a reason to switch, I found this post insulting (as a long time zsh user). And I actually want more people to use zsh, because that would mean more collaboration, more tips, and better script compatibility.
Post reply on HN