How zsh is more useful than bash
131–140 of 151 posts
Re: How zsh is more useful than bash
#132WTF? 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.
Re: How zsh is more useful than bash
#133Earlier quoted context omitted.
It does fix typos for me too, but most of the time asks weird things like, I typed 'aptitude' did I mean '.aptitude'? It loves misinterpreting some of my commands as dotfiles. Huh? Then again I have a knack for unintentionally breaking computers, so maybe I've done something in env or rc that's messed it up...
Using the following got rid of a lot of my correction woes: alias sudo="nocorrect sudo" That is why you were getting the .aptitude one, you can use it for other commands that it gets the corrections wrong often. I've since moved to vanilla bash+bash completion since it is everywhere and zsh completion seemed to annoy me more than help me.
Re: How zsh is more useful than bash
#134Does zsh have bash's ESC+.?
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.
Esc-Q sounds easier, though.
Re: How zsh is more useful than bash
#135My 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
#136I see your zsh and I raise you fish: http://ridiculousfish.com/shell/ Try it. It's better.
I tried fish for a while, and it's really great. The out of the box experience is way better than zsh and bash. But I switched to zsh, mostly because I couldn't get used to the different syntax.
Re: How zsh is more useful than bash
#137Path replacement is also possible in bash, as in: cd site1 site2 if you just add this line to your ~/.bashrc: function cd() { if [ $# -eq 2 ]; then builtin cd ${PWD/$1/$2}; else builtin cd $1; fi }
A cleaner version: ^site1^site2
Re: How zsh is more useful than bash
#138My favorite feature that wasn't mentioned is completions for `kill`. For example, in bash I would have to `ps -ef | grep command_I_ran` then `kill -9 process_id_of_command_I_ran`. Bonus points if you can do that in one command! In zsh, you only need to do `kill -9 partial_command_i_ran[tab]` and it will complete it for you. Also, !$[tab] and the like. Also, you can set the theme to random to get a surprise every new…
Re: How zsh is more useful than bash
#139I 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.
I don't know what those are, but why not start them with a bash script, that you launch from zsh?
Re: How zsh is more useful than bash
#140Earlier quoted context omitted.
I just checked and fish is way slower at 'ls *' than zsh. (zsh was done 2x as fast even with a directory with more than 3x as much stuff in it) I have also a few other flags set in my zsh aliases that's not in fish. (Tested with 2.0b2)
fish passes the -G flag to 'ls' by default, which produces colorized output, but stats each file. So fish is actually outputting more information than zsh, and what your test is really measuring is the speed of '/bin/ls' vs '/bin/ls -G' To compare ls speeds for the same workload, run it directly: /bin/ls. I expect no difference, because it is the same binary. If you wish to compare globbing speeds, do not use bare ls…
('/bin/ls *' is just as fast with '--color=yes' for me btw)