Live data from Hacker News

Use Zsh

fendrich.se

61–70 of 117 posts

Re: Use Zsh

#61
post #34

Here's another perspective: http://sstephenson.us/posts/on-configuration

I independently wrote pretty much the same post. http://www.apreche.net/dont-change-the-computer-change-yours...

I can't provide source right now, but Microsoft pretty much said the same thing when they updated handwriting recognition for Windows Tablet PC Edition.

In the past they'd go through a procedure where they would learn how you write.

But later on, they decided it was most effective for you to learn to write in a way that the handwriting recognition software would understand.

Re: Use Zsh

#62
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.

I had this problem on OS X too, but it had to do with login, not the shell. Try `touch ~/.hushlogin` and see if your shell starts up faster.

Re: Use Zsh

#63
post #60
post #42

Been trying zsh for a while, ran fish for 1 or 2 years. Am back to bash because to many scripts rely on bash and wont't work on zsh or fish. Thing is, it's note that hard to get the mentioned features in bash. Good tab completion, good git enabled color prompt, ssh completion, host completion, command completion and (my favorite) "start typing, press up, cycle through command history with the given input" aka reverse…

I use zsh and write all my ~/bin/ scripts in bash.. what problems did you encounter? I don't see how issues could possibly even occur.

You write YOUR scripts in bash, it's not about my scripts though ;)

Also, it's annoying to constantly switch between zsh and bash when you are working on other servers over 50% of your time.

Re: Use Zsh

#64
post #63
post #60

Earlier quoted context omitted.

I use zsh and write all my ~/bin/ scripts in bash.. what problems did you encounter? I don't see how issues could possibly even occur.

You write YOUR scripts in bash, it's not about my scripts though ;) Also, it's annoying to constantly switch between zsh and bash when you are working on other servers over 50% of your time.

I was wondering what you mean by "many scripts rely on bash". If you write a script in bash it will work from zsh just fine.

I guess I don't really run into the same adoption difficulty other people seem to, since at work we use zsh instead of bash.

Re: Use Zsh

#65
post #23

just installed zsh but now my rvm is broken, any quick tips? tried adding the following to .zshrc but it doesn't appear to have fixed the issue: if [[ -s "$HOME/.rvm/scripts/rvm" ]] ; then source "$HOME/.rvm/scripts/rvm" ; fi

Are you using 1.16.x? The changelog mentions improved zsh support. http://www.engineyard.com/blog/2012/rvm-1-16/

Got it figured out, turns out .rvm/bin ended up in PATH which screwed it up.

Re: Use Zsh

#66

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.

In spirit, here's mine [0], where I maintain a configuration that works in a similar way for both bash and zsh and does not try to make one identical the other[1]. It respects login vs interactive, and is reasonably fast on start (i have a few ideas to make it faster).

It's designed to be lean, DRY, simple and modular. You can use it as is, overwriting you own dotfiles with setup.sh, or you can pick-source each file/feature you want individually (some need a couple vars set, grep for DOTFILES_).

It leverages available software but tries not to break when it's not available. It works under both Linux and OSX.

It includes an implementation of something like vcs_info for bash, leading to a much more configurable PS1 than git's provided bash prompt support.

Its prompt tries to use colors semantically, and keeps things logical and non-cluttered.

If this reads like this is the best thing since slice bread, that's because it is! ... for me. But I'm sure you could find a useful thing or two in there.

[0] https://github.com/lloeki/dotfiles

[1] I went all the way to hack support of right prompting and reverse-% cleanup on non-newlined output in bash. It works well... most of the time, but when it breaks it's ugly so I just disabled it.

Re: Use Zsh

#67
post #57

I use prezto ( https://github.com/sorin-ionescu/prezto -- initially a fork of oh-my-zsh).

Same here. oh-my-zsh was too slow for me and took away one of the advantages of zsh (that of being faster to load than bash). Also, a great number of oh-my-zsh config options are, to me, incredibly annoying (the long completion menu is the worst shell interface ever invented).

I'm in the process of trimming down prezto to exactly what I need, since it also has too much fluff. It's a great resource, I'd recommend it to anyone wanting a slimmer and easier to grok zsh configuration.

Re: Use Zsh

#68
I use zsh for day-to-day use. It's mostly been good to me but sometimes I contemplate switching back to bash because of the performance: sometimes zsh simply hangs for seconds at a time. I'm sure one extension or another is at fault and I could fix the performance issues by reconfiguring things, but I really don't want to put the time into doing that.

Re: Use Zsh

#69
post #34

Here's another perspective: http://sstephenson.us/posts/on-configuration

I independently wrote pretty much the same post. http://www.apreche.net/dont-change-the-computer-change-yours...

I'm curious why you choose Windows over OS X. I went from Windows, to Linux, to OS X. To me OS X is an alternative to Linux that just works. I still have a proper shell without resorting to virtualization and splitting systems.

Re: Use Zsh

#70
post #38

Everything in the "Context based tab completion" paragraph is already done by bash_completion. * It knows which commands git takes? Yes. * which hosts are in my hosts file for ssh? Yes. * which users my system have when I write chmod? Yes. * available packages to apt-get? Yes. Plus everything in /etc/bash_completion, plus the hundreds of additional commands in /etc/bash_completion.d, plus many, many online resources…

One important difference between how that completion works and zsh's is that zsh cycles between the available completions if you repeatedly type tab. E.g. if you have the files [less01.png, less02.png, less03.png] and type "eog less" in bash will show you the files. Press tab again and it will list the files again. In zsh, the second tab press would fill in "less01.png", then "less02.png" and so on.

It's a matter of preference which completion strategy is the best, yes. :) But for me I've found that zsh's way to do it saves me many more keystrokes than bash's way.

Post reply on HN