Re:Fish Shell Design Principles
by threatofrain on Tuesday February 16, 2016 @04:03AM
(#11108656)
Fish is the shell I wish I could use, but I'm afraid of the tinkering I have to do to get common tools and workflows to work.
[ Parent
| on HN ]
One of my users is using fish in an otherwise zsh-only environment, so far we've only ran into problems once: virtualenv's activate script needs to be shell-specific to muck around with env variables. Every other tooling we use for webdev (npm, bower, whatever the kids are using now to pretend make doesn't exist, …) runs without problem.
There is activate.fish provided by virtualenv. In case you didn't already know (you didn't menation, thought it might be good to let others know if they see this).
I use virtualfish, which is even better:
99% of shell scripts are just executables that have a shebang line at the top. As a rule of thumb, the only time when using a posix-compatible shell as your interactive shell matters is when you are expected to "source" or "eval" a sh script that is generated by some other program (as the virtualenv example)
Re:Fish Shell Design Principles
by justinmayer on Tuesday February 16, 2016 @01:18PM
(#11111909)
My Tacklebox/Tackle projects bundle Virtualfish, which addresses this very elegantly.
More info: https://hackercodex.com/guide/tacklebox-fish-shell/
Bass might provide some help with that.
I transitioned from zsh without any hassle, though I did need to port my environment variable config.
Fish works great in everyday use, especially the 'smart completion'. I didn't encounter shell scripts that wouldn't work in fish, since they don't run though fish, but sh or bash. Naturally some bash things don't work on the command line (for instance backticks), for these I usually quickly jump into a bash session, run the bash expressions, and then go back to fish.
fish simply replaced `backticks` with (parentheses). give it a go.
Re:Fish Shell Design Principles
by ajsalminen on Tuesday February 16, 2016 @06:22AM
(#11109148)
Backticks aren't recommended even in POSIX anymore, $() is the newer, preferred alternative.
Huh? Does sh have "$()"? I thought we had to use backticks for POSIX-only environments.
Yes, POSIX sh has $(): 2.6.3 Command Substitution (http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu...)
Re:Fish Shell Design Principles
by spinningarrow on Tuesday February 16, 2016 @06:13AM
(#11109123)
Just take the plunge! Support for popular tools is better than it used to be. I've been using it for a few years now and it's been quite a while since I faced any sort of issues.
It's subjective of course, based on what your workflows are and how much bash-fu they involve.
I spent a long time feeling that way too, and then took the job one day. Turns out its generally fine - I had a bit of pain getting NVM to work, but otherwise its been really smooth.