News for hackers. Stuff that matters.
Re:Zsh Configuration from the Ground Up by anderscarling on Monday August 21, 2017 @07:48PM (#15068717)
I can't encourage people enough to actually set up their zsh manually instead of running a configuration framework.

I spent a few hours on this about a year back and went from over 2s to about 0.15s for a full run of an interactive login shell (`time zsh -l -i -c 'echo "test"'`). No functionality lost, at least none that I actually used and cared about.

Definitely one of the best quality of life improvements I've made to my setup in recent years.

Re:Zsh Configuration from the Ground Up by timewarrior on Monday August 21, 2017 @09:46PM (#15069149)
Couldn't agree more. I did the same. Big improvement in performance and I have a better idea of how to customize as per my preference.

I was also worried about random code getting downloaded to my machine and getting executed.

Re:Zsh Configuration from the Ground Up by stephen123 on Monday August 21, 2017 @11:14PM (#15069439)
Thanks for showing us how to test that. My standard ohmyzsh takes 0.185 seconds.

  ~ time zsh -l -i -c 'echo "test"'
test zsh -l -i -c 'echo "test"' 0.09s user 0.07s system 86% cpu 0.185 total ~
Re:Zsh Configuration from the Ground Up by kuschku on Monday August 21, 2017 @05:23PM (#15067971)
I use powerline-shell in zshell, and was also extremely annoyed by the delay.

So, I decided to rewrite https://github.com/banga/powerline-shell in go, and the performance is amazing.

The latency went down from several seconds to 200µs (except when git is used, then it’s ~4ms), and it’s fast enough.

The repo is at https://github.com/justjanne/powerline-go. Here’s a small video showing just how different the latency is: https://s3.kuschku.de/public/2017-08-21_16-43-41.mp4. Disclaimer: Although the original was MIT, I licensed my rewrite under GPLv3.

Improving the latency of software is just such an amazing quality-of-life improvement, it was well worth those 10 hours of work.

Re:Zsh Configuration from the Ground Up by t0mbstone on Monday August 21, 2017 @01:29PM (#15066107)
Pretty sweet collection of zsh shortcuts and tips.

Who cares if it's old, if it's still relevant?

Is there something out there now that is better than zsh?

Re:Zsh Configuration from the Ground Up by xiaq on Monday August 21, 2017 @09:13PM (#15069010)
Shameless plug: https://elvish.io

I cannot claim that it is better than zsh in every aspect yet, but it is getting there.

Re:Zsh Configuration from the Ground Up by fish_fan on Wednesday August 23, 2017 @01:39AM (#15078799)
Super interesting! Totally worth a post in itself IMHO.
Re:Zsh Configuration from the Ground Up by xiaq on Wednesday August 23, 2017 @05:45AM (#15079979)
It was on homepage a while ago: https://news.ycombinator.com/item?id=14698187
Re:Zsh Configuration from the Ground Up by binarycrusader on Monday August 21, 2017 @02:27PM (#15066537)
No one has yet implied that it's irrelevant because it's "old".

However, my view is that we are generally chronological beings at heart, and knowing the year that something was posted (if it wasn't the current year) is a useful to aid in determining whether we may have seen it before or whether it may be particularly relevant to our interests.

Re:Zsh Configuration from the Ground Up by fish_fan on Monday August 21, 2017 @04:16PM (#15067482)
Fish is pretty sweet. The biggest annoyance IMHO is that you have to use env to set environment variables inline to execution.
Re:Zsh Configuration from the Ground Up by dijit on Monday August 21, 2017 @06:46PM (#15068404)
My biggest issue with fish is that it has no way of letting me kludge the last command like bash does. I have muscle memory for bash shorthands like !$ For last word of the last command I executed or !! For the whole line.

It still catches me out with its sub shells too sometimes. ( () is equiv to $() in bash )

Also. No control+R

Otherwise I think it's a beautiful shell and I keep using it.

Re:Zsh Configuration from the Ground Up by ufo on Monday August 21, 2017 @07:10PM (#15068553)
The fish philosophy is that instead of "!!" you can use the up arrow to bring up the last command from history and then edit it directly.

And the up arrow already does something similar to ctrl-R by default. No need to have a separate hotkey for that behavior.

Re:Zsh Configuration from the Ground Up by Lazare on Monday August 21, 2017 @11:24PM (#15069468)
> Also. No control+R

What would control+R do for you that isn't just part of the fish autocompletion?

Re:Zsh Configuration from the Ground Up by ufo on Monday August 21, 2017 @07:13PM (#15068564)
I don't think the env thing is that big of a problem with Fish. For me, the most annoying thing is that it doesn't interoperate well with programs that output POSIX shell strings that you are expected to eval. One particularly annoying example is pkg-config.
Re:Zsh Configuration from the Ground Up by fish_fan on Monday August 21, 2017 @07:58PM (#15068762)
Agreed, this isn't that annoying; i largely have no issues with fish at all.

However, I particularly found it difficult to get working with nix, unfortunately.

Re:Zsh Configuration from the Ground Up by jolmg on Monday August 21, 2017 @09:55PM (#15069172)
I tried fish for a while some years ago, and left it when I noticed that its pipes were fake. Second command in a pipeline couldn't read any input until first command finished running. That made it useless for things like `strace ... | grep ...`. Trying it now, it seems they've fixed that.

I remember that I was interested in it for its multiline command formatting and history. Since then, though, I've learned that zsh also has support for multiline command history, and its vi keybindings support multiline editing for a single command. It's like every command line is a little multiline vi buffer. For this reason, I've chosen my prompt so that the command starts at the first column.

Re:Zsh Configuration from the Ground Up by memco on Tuesday August 22, 2017 @12:56AM (#15069831)
Been a fan of fish mostly for its typeahead autocompletion. I do miss that it doesn't have some of the Bash features others have mentioned, but it's a feature I haven't been able to replicate in other shells yet.
Re:Zsh Configuration from the Ground Up by binarycrusader on Monday August 21, 2017 @11:52AM (#15065428)
Needs a "(2013)" tag
Re:Zsh Configuration from the Ground Up by yummy on Monday August 21, 2017 @06:36PM (#15068341)
grml's zsh config is so good that I never wanted to change anything in it (it's default in Arch liveusb)

Oh-my-zsh is for aliens

Re:Zsh Configuration from the Ground Up by raverbashing on Monday August 21, 2017 @03:23PM (#15067011)
oh-my-zsh is really good. The only thing I needed to do was set DISABLE_UNTRACKED_FILES_DIRTY="false" which is a default that really makes no sense

Also find a theme that works for you

Re:Zsh Configuration from the Ground Up by ben174 on Monday August 21, 2017 @04:20PM (#15067510)
> alias 'devmount=mount_smbfs //ome:ch1cag0@localhost:10139/ome /Users/$USERNAME/Projects/devvm/'

Whoooops...

Re:Zsh Configuration from the Ground Up by zan5hin on Monday August 21, 2017 @04:25PM (#15067559)
Provided access to a VM (@localhost). Not as big a whoops as you would like.
Re:Zsh Configuration from the Ground Up by zaszrespawned on Monday August 21, 2017 @01:02PM (#15065923)
Please tag old posts as old posts. This was written on February 02, 2013...