Hacker News new | past | comments | ask | show | jobs | submit login

Great.. here I am all ready to try switching to zsh and now here's a new fish..

Which to go for..?




I've "skipped" zsh--I tried it a few times, but it didn't seem enough better than bash for it to be worth learning, converting all my scripts, and so on. fish does seem worth the effort, and in fact many of my bash scripts and configuration settings are now unnecessary.

FWIW my (rapidly changing) fish configuration:

https://github.com/ithinkihaveacat/dotfiles/tree/master/fish


You likely want to move your environment variables to ~/.pam_environment instead of setting them in fish configuration.


Is ~/.pam_environment that cross platform? I'm trying to use the same config on Linux and OS X.


Most of the bash scripts wouldn't need converting at all. zsh, IMO, is a solid drop-in replacement for bash.


If you're just jumping off bash and don't have a long .zshrc with aliases (which might make the migration a bit painful), then without a doubt try fish!


I used to use fish for a long time... eventually I switched back to zsh because of too many incompatibilities with running shell scripts.


Several purple have mentioned 'incompatibilities' and I don't understand the problem: sure fish syntax is different and fish cannot be used to run a sh script, so just don't try to run sh scripts with fish. Every script I've run across starts with #!/bin/sh and I can use it from fish with no difficulty (it starts up a sh). The only issue I had is that Vim assumes that your shell is sh compatible, so I put a set shell=sh in my .vimrc and now all the shell stuff in vim runs fine. What problems did you mean?


Speaking for myself, there are a number of times when I have to source scripts from bash to get certain functionality I like. Most notably, when using virtualenv.


As nagisa said, you can simply use: . bin/activate.fish

Even better is Virtualfish, which I've been using and contributing to very happily: https://github.com/adambrenecki/virtualfish


Virtualenv puts an activate.fish script into ./bin/ too.


virtualenv has support for fish:

    . bin/activate.fish


For me, it is just random stuff is broken. One example is `git mergetool` doesn't work in fish. I have no idea why that would be the case.


I guess the vim issue I ran into (that I solved by telling vim to use sh: set shell=sh), is the same sort of problem as the 'git mergetool' problem you mention.


Couldn't you just switch shell in the (presumably) rare case when you want to run a bash shell script?


No need, just run bash with the script: bash script-name. Or better yet, start the script with #!/bin/bash


My situation exactly oneandoneis2! I've used Bash for 12 years, tried zsh for the last few months and not really noticed the difference tbh. Will see if fish gives me an 'aha' moment




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: