News for hackers. Stuff that matters.
Re:Fish shell 2.2 by Revell on Sunday July 12, 2015 @08:52AM (#9873324)
My main gripe with a shell like Fish is that it won't work with the trusted ol' BASH scripts. Seeing as I deal with quite some BASH scripts on a day-to-day basis at work this keeps me from trying it out, even though I'd love to be able to use something more sophisticated/evolved than plain BASH.
Re:Fish shell 2.2 by tachion on Sunday July 12, 2015 @09:53AM (#9873493)
My main gripe with 'BASH scripts' is that in most cases they could simply be 'Shell scripts' and in most cases they call and require Bash for no reason at all ;)
Re:Fish shell 2.2 by TorKlingberg on Sunday July 12, 2015 @12:47PM (#9874010)
I guess most people cannot be bothered to remember which features are bash specific and which will work in any /bin/sh. I don't think there is such a thing as a generic "shell script", csh has completely different syntax.
Re:Fish shell 2.2 by stephenr on Sunday July 12, 2015 @05:39PM (#9875088)
The generic variant is called posix compatible or sometimes Bourne compatible.

Lots of people target bash without knowing that some of its non-posix features are not compatible across even minor versions.

Re:Fish shell 2.2 by omtose on Sunday July 12, 2015 @09:00AM (#9873346)
How come your scripts don't work with #!/bin/bash ?
Re:Fish shell 2.2 by markab21 on Sunday July 12, 2015 @09:19AM (#9873396)
Yeah, I keep seeing this complaint come up. Interesting that so many people don't realize you can run bash scripts from another shell without fanfare.
Re:Fish shell 2.2 by keedot on Sunday July 12, 2015 @09:36AM (#9873446)
We realize, we're just doing something different than you are.
Re:Fish shell 2.2 by rtpg on Sunday July 12, 2015 @10:14AM (#9873549)
There's just a couple tricky ones in these scenarios.

For me, there's virtualenv and rvm that both mess with shell stuff deeply enough to where running them in fish can be tricky.

virtualenv has good fish support, but never really got rvm working. I ended up going back to zsh after 2 years or so in fish because of small issues like that and realising that so long as I had reverse search I wasn't really gaining much in productivity from fish.

Re:Fish shell 2.2 by lnikkila on Sunday July 12, 2015 @10:24AM (#9873579)
rbenv has good fish support out of the box if you're willing to switch from rvm:

https://github.com/sstephenson/rbenv

Re:Fish shell 2.2 by mixmastamyk on Sunday July 12, 2015 @05:09PM (#9874978)
In my terminal I usually have several tabs opened by default in fish, but have another open to the python repl, and sometimes bash if I need something. Easy enough to do.
Re:Fish shell 2.2 by keedot on Sunday July 12, 2015 @09:36AM (#9873445)
Because we don't always source a shell script, you may need to source functions for certain functionality to work.
Re:Fish shell 2.2 by qznc on Sunday July 12, 2015 @04:57PM (#9874940)
Imho "source" is an anti-feature. I think instead of "source", you always should create a subshell. It properly encapsulates your modified environment and avoids leakage and confusion. Exiting an environment is a straighforward exit/<ctrl>-D like with any shell. You do not need to remember a special "deactivate" command like with virtualenv.

Obviously, virtualenv and others disagree. ;)

Re:Fish shell 2.2 by regularfry on Sunday July 12, 2015 @05:17PM (#9875008)
I swear by subshells. They solve so many problems. People object that they don't let you do environment autoloading on `cd`, though (which I also hate, so... Yeah).
Re:Fish shell 2.2 by Symmetry on Sunday July 12, 2015 @10:29AM (#9873600)
What I do is configure my terminal emulators to use fish but leave bash as my system shell.