I love using zsh (in combination with oh-my-zsh) on OSX but the only thing I've noticed after using it a year is that it's becoming very very slow. As in, it usually takes me 5-10 seconds to login to a new session (locally) and be able to see the prompt and type something. Tab auto completion takes a second or two (even for files). Combined with the git plugin I have enabled (which does "git status" on every prompt i…
How zsh is more useful than bash
111–120 of 151 posts
Re: How zsh is more useful than bash
#112I 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
#113Earlier quoted context omitted.
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 colour I 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 a…
Actually, except the `SHARE_HISTORY` option (which can be emulated), everything else is available in Bash.
Re: How zsh is more useful than bash
#114Earlier quoted context omitted.
Yes. Not only that but it has something even cooler: ESC + Q Let's say you are about to finish a really long command and realize you should have done one other command first. ESC + Q clears the current line, lets you enter a command, and then inserts the cleared line again on the next prompt. You have to try it to realize how cool it is.
> Yes. Not only that but it has something even cooler: ESC + Q ESC+. does not work for me with zsh. zsh 4.3.11 (i386-apple-darwin12.0) Maybe it's the version. ESC+Q also doesn't clear the line. At the same time, the OP links slide deck fails for me at the cd /u/lo/b part. It simply doesn't work.
Re: How zsh is more useful than bash
#115My personal favorite zsh specific feature is the REPORTTIME environment variable. When set to a nonzero number it'll automatically print a summary after a long running command. My own http://imgur.com/6LCS1cj
Re: How zsh is more useful than bash
#116yes, bash is great except it's not default sh.
Re: How zsh is more useful than bash
#117Example: $ rm * .gch dir/* .gch
$ rm file1.gch file2.gch file3.gch file4.gch dir/file5.gch
I really enjoy it when I'm removing something sensitive and just want to make sure.
Re: How zsh is more useful than bash
#118My personal favorite zsh specific feature is the REPORTTIME environment variable. When set to a nonzero number it'll automatically print a summary after a long running command. My own http://imgur.com/6LCS1cj
Hmm doesn't work for me, is it an option you need to turn on?
export REPORTTIME=1Re: How zsh is more useful than bash
#119While zsh may be more 'useful', I find it a bit too smart. Many of the features are very interactive, and introduce a non-determinism that messes up my ability to fix errors. An example is command correction. I (usually) know when a command is wrong, and go to fix it without thinking. Being asked if you really meant some other command interferes with this, and while seemingly helpful, makes you wonder if a shell shou…
I don't use them. But there are similar stupid features in bash which I also don't use. Configuring a shell seems normal to me.
Don't get me wrong though, bash does have its bad points.
Re: How zsh is more useful than bash
#120yes, bash is great except it's not default sh.
lolwut
BSD has the almquist shell as it's /bin/sh and tcsh as it's /bin/csh. Various commercial vendors licensed the korn shell from bell labs. The korn shell is public domain and open for 13 years now. The default sh on most UNIX boxes are either ash or a hard link to ksh which emulates the POSIX definition of sh. zsh and bash also provide the option to hard or soft link so depending on your distro you may have /bin/sh linked to bash.
Debian at one point repackaged the BSD almquist shell as their system sh calling it dash mainly for speed and stability. I believe they removed it as their programmers apparently couldn't program system level scripts without their non portable bashisms or maybe just one of the NIH moments where everything must live under a single mono-cultural license and identity.