Hacker News new | ask | show | jobs
by gtm1260 2876 days ago
fish is nice but I've ran into too many issues where some weird shell command / script I find online is expecting to be in bash and I have to switch out of fish, so its hard for me to switch.
4 comments

As long as they don't need to be sourced, you can just add a shebang for bash at the top of the scripts and run them via bash.
If they do need to be sourced, you can use bass: https://github.com/edc/bass
Wow this is neat — I’m gonna try this out. Does it really work?
It works at least for nvm (caveat: Installed from nvm directly, not homebrew), and my company's ssh setup script, which are the two reasons I've had cause to use it.
Just run it with bash then. The syntax is too different to run bash script on fish.
You can usually drop to a bash subshell for those
Fish 3 will fix a lot of that. Try the nightly builds.