
Kungsholmen

Kungsholmen

Strand, Hornstull
I am a command line kind of guy. When working I prefer typing instead of clicking. Until now I was using bash but then I stumbled across fish shell and fell in love. Simple Ruby-like scripting syntax. Convention over configuration. Globbing. Autocompletion. What else do I need? I installed it with MacPorts and customized my config. Everything was great or that’s what I thought. Fish acted very weird on my MacBook. It froze sporadically for approximately five seconds. I couldn’t figure out what was wrong and I honestly didn’t try that hard either. First I thought that I could live with it but it actually got really annoying after a while.
So I started looking for an alternative and switched over to zsh after reading all those “zsh is the best, you should use it too” blog posts. I tried hard to adjust myself to zsh scripting syntax, understand all its configuration options, completions but wasn’t that easy. Zsh might be great but the learning curve was too steep and I felt like I could use my time on something more interesting than zsh’s completion options.
I didn’t want to go back to bash so googled for a while trying to find the cause to fish shell’s freeze, one could also say command delay, problem and actually found a solution to this bug on the Fish shell mailing list by a guy named Ben. Bingo! I cloned and installed Ben’s fork from Github but there was something in his version that didn’t play right with my fish configuration. It is then I decided to manually patch the MacPort version. Here is how I did it.
sudo port uninstall fish sudo port clean fish sudo port fetch fish sudo port configure fish cd /opt/local/var/macports/build/
Edit the file __opt_local_var_macports_sources_rsync.macports.org_release_ports_shells_fish/work/fish-1.23.1/proc.c
Find the line that says:
tv.tv_sec=5 tv.tv_usec=0
Change tv_sec value to 0 and tv_usec to 10000
sudo port install
Voila! Start a new instance of fish and don’t forget send a thank you note to Ben Hoskings for the solution.