Live data from Hacker News

Use Zsh

fendrich.se

101–110 of 117 posts

Re: Use Zsh

#101

There's one of these "why you should convert from X to Y" posts every week or so. I understand that a person can be somewhat excited about finding a better application to replace their old stand-by and might feel the need to evangelize. I don't see anything wrong with wanting to introduce others to new software with a helpful attitude. However, it seems like all of the bash-to-zsh posts boil down to better autocomple…

I read HN religiously (perhaps too much so), and I am absolutely interested in bash vs zsh - and this is the first time I've read an article on the topic.

Never heard of oh-my-zsh before. Loved the post.

Re: Use Zsh

#102
post #84

There's one of these "why you should convert from X to Y" posts every week or so. I understand that a person can be somewhat excited about finding a better application to replace their old stand-by and might feel the need to evangelize. I don't see anything wrong with wanting to introduce others to new software with a helpful attitude. However, it seems like all of the bash-to-zsh posts boil down to better autocomple…

The killer feature of zsh is not the tab completion but the globbing. Really. More or less, you never need the 'find' tool when using zsh. For example, if I want to find all the Makefiles in this or child directories that have the string 'abc' and have been modified less than 1 hour ago, I can do $ grep -l abc **/Makefile(mh-1) If I want to look at the most-recently-modified file, I can $ less *(om[1]) If I have a sy…

zero padding brace expansion has been available since bash version 4 20/02/2009

$ echo {000..10}

000 001 002 003 004 005 006 007 008 009 010

Re: Use Zsh

#104
It's not portable.

And I have to invest time to learn all the codes.

In the times it takes to learn zsh, I could write the same functionality into small sh scripts which I can run on any machine. Put them in a folder, add it to my PATH and I'm in business.

I can tar up this folder and upload it to some internet-connected machine so I can download it to any other machine with an internet connection.

zsh is wonderful. It is the ultimate "interactive" shell. But it's not portable.

Moreover, the less "interactive" I need to be on the command line the better. If I have short, portable scripts to do certain things, and I can run them on any machine with /bin/sh (no need to install anything; sh is the universal interpreter), that's a nice thing to have. zsh won't give me that.

Re: Use Zsh

#105

As someone who used zsh for a while but got tired of setting it up everywhere I go and losing the "local community" bash stuff, I humbly request: someone please post a rebuttal showing how to do all this in bash with appropriate .bashrc/functions and utility programs like fasd.

Not much of a rebuttal, but certainly a counter to oh-my-zsh: https://github.com/revans/bash-it (which includes fasd).

Re: Use Zsh

#106
post #91

There's one of these "why you should convert from X to Y" posts every week or so. I understand that a person can be somewhat excited about finding a better application to replace their old stand-by and might feel the need to evangelize. I don't see anything wrong with wanting to introduce others to new software with a helpful attitude. However, it seems like all of the bash-to-zsh posts boil down to better autocomple…

> better autocompletion Bash has context dependent auto completion as well. So what's the advantage of zsh here?

the quote in your post is the answer to your post.

they both have it - zsh's is better

Re: Use Zsh

#107

There's one of these "why you should convert from X to Y" posts every week or so. I understand that a person can be somewhat excited about finding a better application to replace their old stand-by and might feel the need to evangelize. I don't see anything wrong with wanting to introduce others to new software with a helpful attitude. However, it seems like all of the bash-to-zsh posts boil down to better autocomple…

>I recommend not using oh-my-zsh if you are a beginner I just started started using zsh today, and decided to go with oh-my-zsh instead. zsh is FAR too much configuration to go through to be worth the utility for me. On the other hand, with oh-my-zsh, it took me a few minutes to get a beautiful theme, a bunch of neat plugins (history-substring-search and jump are my favorites right now) and also exposed me to the solarized theme on vim (through a zsh theme that required it).

>It is my opinion that oh-my-zsh ultimately stops people from reading documentation and offers an incentive (ease of use) for using code that may not be understood (when it probably should be)

I'm diametrically opposed to this philosophy. Every time I start out trying to do something perfect or the "right way", I lose interest or time to continue. On the other hand, now that I used oh-my-zsh and it gave me all these awesome features in 10 minutes, I'll be motivated to continue learning about zsh over time.

Not to say that you're wrong and I'm right, just offering a counterpoint.

Re: Use Zsh

#108
post #46
post #31

I tried using oh-my-zsh, but all of a sudden bringing up a new terminal (on OS X) went from taking ~1 second to ~5 seconds. Totally killed my interest in zsh. I'm sure there's a way to make it all work nicely, but bash has been doing just fine for me, I don't feel the need to figure out an entirely new configuration system for a tool that ultimately has little new utility in my workflow.

There is a cleaner 'version' (==fork) of oh-my-zsh that fixed the long startup time for me: https://github.com/sorin-ionescu/prezto . With nice, fast setup (overwrites your .zshrc file!) and lots of documentation.

Thanks, I have the same slow startup issue with oh-my-zsh. But the link does not talk about how to migrate from oh-my-zsh to prezto.

Which files should I copy over, or compare and update once I install prezto ?

Re: Use Zsh

#109
post #73

Earlier quoted context omitted.

This is exactly what I've done for the past year. I realized that most of the time, I know which directory I'm in, I know which user I am, and I know which host I'm on. It's trivial to look up any of these (as well as other crazy things people embed in their PS1). Now my prompt is nothing but a green ">> " on a black background. I'm not deluding myself when I say that the reduced clutter improves my productivity.

To each their own. I'm logged in to at least 5 different hosts at any given time, often many more. Without user/hostname in the prompt and the term-title I'd be completely lost.

In your case, your goal is to reduce the cognitive weight of your environment.

A host name in the prompt is one more string you need to read and it's a user interface mistake as a term is for entering commands and reading their output.

I've seen people successfully using different background colors for visually telling their terms apart. It's a very good solution as there's no reading cost.

I personally use workspaces to sort terms by host and this can be very powerful if combined with tagging. This also works well but I suspect it's linked to my workflow.

Re: Use Zsh

#110
I'm not going to elaborate much because I feel I'll waste my and I have a plane to catch but I have yet to see a compelling argument to make me believe zsh is in any way superior to bash.

All posts on the subject show that theirs authors have been using a shell they don't know and have replaced it by another shell plus configuration files made up by someone more clever. All posts are also bullet lists of features bash can actually be configured to do.

Someone wake up.

Post reply on HN