News for hackers. Stuff that matters.
Re:How zsh is more useful than bash by eatitraw on Saturday May 11, 2013 @08:11AM (#5690387)
I like process substitution feature in zsh. In bash you can write:

vimdiff <(ls /bin) <(ls /usr/bin) [ It is an example. In real world, I use this feature for comparing outputs of one version of program with another one ]

And this will create two pipes, where output of each ls will go. Unfortunately, vimdiff sometimes needs to do second pass on the files, so this command won't work properly when outputs are large.

But in zsh you can write

vimdiff =(ls /bin) =(ls /usr/bin)

and this will create temporary normal files, instead of just pipes, and vimdiff will work fine.

Re:How zsh is more useful than bash by kemist on Saturday May 11, 2013 @08:47AM (#5690448)
Holy cannoli, that's an awesome trick. I've always created temporary files manually then diffed, then deleted them.
Re:How zsh is more useful than bash by McUsr on Saturday May 11, 2013 @12:02PM (#5691014)
That seems like a good reason for switching to zsh!
Re:How zsh is more useful than bash by eatitraw on Saturday May 11, 2013 @01:11PM (#5691260)
Actually I use bash for my daily work, so I run zsh from bash:

zsh -c 'vimdiff =(ls /bin) =(ls /usr/bin)'

A couple of similarly useful features, and I'm swtiching to zsh. But now I am too lazy to make proper configuration.