4 ms·
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 basi
by Revell 11y ago
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.
- tachion 11y agoMy 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 ;)
- TorKlingberg 11y agoI 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.
- stephenr 11y agoThe 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.
- omtose 11y agoHow come your scripts don't work with #!/bin/bash ?
- markab21 11y agoYeah, 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.
- keedot 11y agoWe realize, we're just doing something different than you are.
- rtpg 11y agoThere'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.
- lnikkila 11y agorbenv has good fish support out of the box if you're willing to switch from rvm: https://github.com/sstephenson/rbenv https://github.com/sstephenson/rbenv
- mixmastamyk 11y agoIn 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.
- keedot 11y agoBecause we don't always source a shell script, you may need to source functions for certain functionality to work.
- qznc 11y agoImho "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. ;)
- regularfry 11y agoI 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).
- fuckhncensors 11y agoso it seems that hn blocks on ip after a posting the hive mind disagrees with - maybe stuff like "down with chairman pao" or "fuck the femtards" - but anyway, we just find new ip addresses! we are legion, we are the commentators!
- Symmetry 11y agoWhat I do is configure my terminal emulators to use fish but leave bash as my system shell.