Live data from Hacker News

Zsh is your friend.

mikegrouchy.com

81–90 of 117 posts

Re: Zsh is your friend.

#81
post #50

Earlier quoted context omitted.

It's sort of ok when its `do... done`. But what about `if`..`fi` or `case`..`esac`. +1 for rc.

Honestly, I find that stuff pretty easy to remember. And is it that ugly, in the grand scheme of ugly shell syntax? :) I mean, what about [[ ]] vs. (( )) vs. [ ]? Or the beginning of a case statement? Those always get me since I don't use them often enough for them to stick.

Yes. rc has less of it, fewer edge cases, etc. Even though it still has lists implemented sanely, a full set of redirects, etc:

    $ 9 man rc | wc -l
    496
    $ man bash | wc -l
    4890
Fewer interactive features as well, unfortunately. But it's small enough to keep in your head, and I find that makes it far more pleasant to use.

Re: Zsh is your friend.

#82
post #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.

and the inclusion of oh-my-zsh as a reason to switch

That's the reason why I switched. Perhaps I'm missing something: what's wrong with 'oh-my-zsh'?

Re: Zsh is your friend.

#83
I used to use oh-my-zsh but gave up on it after a few months because it took almost 20 seconds to open up a Terminal tab. I switched back to bash with some really basic git completion and was happy enough, enjoying < 2 second opening times.

Re: Zsh is your friend.

#84
post #83

I used to use oh-my-zsh but gave up on it after a few months because it took almost 20 seconds to open up a Terminal tab. I switched back to bash with some really basic git completion and was happy enough, enjoying < 2 second opening times.

my tabs open up immediately but it does take a little while to log in, which really is annoying. I think depending on how you configure things you can move where and how often the wait occurs and by disabling certain things, how long it is.

Re: Zsh is your friend.

#85
post #48

Earlier quoted context omitted.

Zsh has knobs for shared history. You can configure all terminals to have the same history at the same time, but I have it set to add history to the .zsh_history file immediately, but each shell gets it's own history. So ctrl-r in a shell lists commands entered into that shell (or preexisting when it started), and opening a new terminal starts with the shared history from all terminals. This is really the best of bot…

im pretty sure bash does shared history if you desire it, the configuration is just not as directly obvious. I prefer a long histfile (unlimited really, i. think i have it set to a million lines, but im at about 70 000. i even keep it backed up regularly because its fairly easy to trash the histfile if you are opening subshells and do the wrongthing. timestamped, too, which i find really handy. that said, i do use an…

I like a long history too. I actually automatically rotate my history file every quarter (copying over the 500 most recent entries) and keep around my old history files. It's actually come in really handy when I want to do something I last did two years ago.

Re: Zsh is your friend.

#87
Bash can also do shared history:

  export HISTCONTROL=ignoredups
  export HISTCONTROL=ignoreboth
  HISTSIZE=50000
  shopt -s histappend
  PROMPT_COMMAND='history -a'
  #history search inline
  #bind '"\e[A": history-search-backward'
  #bind '"\e[B": history-search-forward'

Re: Zsh is your friend.

#89
post #80

Thanks mgrouchy for another site that breaks pgdn. The header that never moves hides some lines on the next page. Reading becomes an annoying series of page downs then scroll up a bit to read the hidden sentences. Does this annoy anyone else?

Hey, thanks for the feedback, I just recently changed the look of the blog after about a year of neglect. Its actually just Twitter Bootstrap(1.4). I never use page down or up so I completely missed the problem. I will see if I can find a workaround. Thanks again!

Re: Zsh is your friend.

#90
This article inspired me to give zsh a spin. The pre configured setup of oh-my-zsh is a nice starting point.

But am really missing the Bash "help" command, and the combined (easily searchable) man page.

Thus far I have not been able to figure out which feature or config option to disable to stop this annoyance:

$ grep vim

zsh: correct 'vim' to '.vim' [nyae]?

Please don't "help me", i typed exactly what I wanted.

Post reply on HN