WTF? I wrote this slide deck. It was a presentation I made for a monthly "tech lunch" my team has. I made it after a couple of weeks of messing with zsh. It was for an audience of 4 other people who knew less about zsh than me. I can't believe someone posted it to HN! That explains the "this slide deck is getting traffic" email I got from Slideshare this morning.
I enjoyed the slides. Great job! Many people like me are new to whole Unix system and need trainings like this. I did not even know that I can upgrade my bash via homebrew. I don't dare to switch to zsh yet. I'm afraid if it messes up all my bash_profile, rvm stuff and Vim configs. I have a bad memory with fish_fish
How zsh is more useful than bash
81–90 of 151 posts
Re: How zsh is more useful than bash
#82I see your zsh and I raise you fish: http://ridiculousfish.com/shell/ Try it. It's better.
i just tried fish. out of the box experience is great. not digging much yet but so far, so good. much faster start up time than zsh. this is 2013 already and i seriously dont' want a shell takes up a second or 2 to fire up.
I do not know if it has all I love in zsh (things like (.) or (om^/) or * or !$), but I would not trade zsh's completion for gaining 10% on startup time.
Re: How zsh is more useful than bash
#83Earlier quoted context omitted.
I had just switched to zsh and found your deck when searching for something like "zsh features", I thought "hey this is great for starting out with zsh and maybe a good post for HN". Thank you for releasing it for everyone to see.
I'm glad that you and other people found some value in it. When I saw it here, I was worried the comments would tear it to shreds. :) It was just a bit of a shock when I clicked the link. Since the link title was slightly different than what I named my slides, I just thought, "oh hey, another zsh comparison, let's see what this guy/gal said"...
Re: How zsh is more useful than bash
#84Re: How zsh is more useful than bash
#85After using zsh for a while I moved back to bash. The main reason is that I want to learn bash well, because I might be writing shell scripts in the future and I don't want to use zsh specific features in my scripts so I don't want to get used to them.
How is this a worry?
The topline in your bash script is '#!/bin/bash'
Which tells the system 'run this with bash'.
Re: How zsh is more useful than bash
#86I switched back from zsh to bash, and I miss it terribly. Problem is, I need to run both virtualenv and rbenv, and they're both designed for bash, and don't work properly with my zsh for some reason.
Re: How zsh is more useful than bash
#87The site1 site2 substitution slide is at best disingenuous; I believe in bash you could type ^site1^site2 and get the same result.
Not at all. ^site1^site2 would only work if it was your last command. The idea, I believe, is when your browsing around multiple versions of the same directory structure. The 'cd site1 site2' allows you to jump directly to the equivalent directory in the other structure. The equivalent in bash would be something like: cd `pwd | sed 's/tmp1/tmp2/'`
Re: How zsh is more useful than bash
#88Problem is zsh is not omnipresent like bash is. I'm sure that if you use zsh you also use Plan 9, code in D, write LuaTeX in Emacs and wear a monocle.
I don't think it's that much of a problem. My local machine is zsh, my linux servers run bash, my solaris hosts csh. Where ever I am, I just adjust to the local environment.
Re: How zsh is more useful than bash
#89yes, bash is great except it's not default sh.
Re: How zsh is more useful than bash
#90I think the zsh-vs-bash debate is centered on minimalist vs. full-featured. For instance, the git completion example is very ugly in zsh to me. I know what git commands do, and I'd much prefer for the completion to take 1-2 lines total than one line per possible command, as in the zsh example. The prompt examples are similar -- my PS1 is local green="$(tput setaf 2)" local reset="$(tput sgr0)" export PS1="\[$green\]>…
local green="$(tput setaf 2)"
local reset="$(tput sgr0)"
export PS1="\[$green\]>>\[$reset\] "
Could be this in zsh: export PS1="%{%F{green}%}>>%{%f%} "
- %{%} replace \[\]
- %F{color} sets the foreground colour
- %f resets the foreground colourI would go with something like:
export PS1="%{%(?.%F{green}.%F{red})%}>>%{%f%} "
It will be green if the last command exiting successfully, otherwise it will be red.There's also better history support (from my zsh config):
# History
# ~~~~~~~
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=$HOME/.zsh_history
setopt SHARE_HISTORY # Share history across sessions
setopt HIST_IGNORE_SPACE # commands starting w/ a space don't go into history
# SHARE_HISTORY seems to imply both of these, at least that's how the manpage
# reads, so let's comment them out for now.
#
# setopt INC_APPEND_HISTORY # Incrementally append history to file
# setopt EXTENDED_HISTORY # Save the timestamp and duration of commands to history file