What does HackerNews think of bass?

Make Bash utilities usable in Fish shell

Language: Python

I've never needed it, but there is bass for this use-case: https://github.com/edc/bass
I haven’t found much need to swap due to using bass

https://github.com/edc/bass

If you're running a script, you can use edc/bass to run it from a fish shell. Fisher is one of the first things I install after fish, then bass, z and a few other helper plugins.

https://github.com/edc/bass

https://github.com/jorgebucaran/fisher

bass can be helpful for some of those posix issues:

https://github.com/edc/bass

Another random tip: python virtualenv generates a activate.fish script that you should use instead of the plain activate script.

You can use fenv or bass for that. They run a snippet or script of bash in bash, then import all the environment changes for you

https://github.com/oh-my-fish/plugin-foreign-env

https://github.com/edc/bass

There is no need to change `$SHELL` :-/ you can use Bass (https://github.com/edc/bass) to execute any bash script and it will apply the environment variables to the current fish environment.
Or running the pasted scripts through bash in fish?

I actually use this guy: https://github.com/edc/bass

You might want bass (https://github.com/edc/bass) or replay.fish (https://github.com/jorgebucaran/replay.fish) if you need to run bash scripts that modify the shell. I personally use replay.fish (although I guess I haven't updated in a while since my version is still called "bax").
I think for the devops person or someone doing server administration (sysadmins etc) powershell everywhere must make things easier even with the trade offs (as some have mentioned, it does have a bigger memory foot print, which may or may not matter depending on a host of factors)

As a developer? I haven't found PowerShell more useful than zsh/bash or fish (if you haven't, try fish, it has a lot of benefits of PowerShell (fish has its own scripting language that is more "language like", like some of the more simple constructs of Python, syntax wise) but via a simple plugin[0] you get bash compatibility too, and its made for Unix like environments). I do like that it has a rich object data model, I just don't do that kind of thing in my shell. I mostly use aliases, shortcuts, and maybe some grepping. I don't do heavy duty tasks from the command line where I'm not writing the logic in the first place, and I just find it easier to use the standard that my team does (currently, this is JavaScript, with the shebang it executes just like a binary. We can reliably say everyone has the same version of node)

Maybe in the future this will change, but I don't see the win to divide my attention economy to it deeply, personally.

[0]: https://github.com/edc/bass

I've made use of 'bass' before. The example they have is sourcing nvm's bash script so it's usable in fish. https://github.com/edc/bass
Or via Bass[1], for things that modify the environment.

[1] https://github.com/edc/bass

https://github.com/edc/bass

Lets you use bash utilities from fish. So you can do things like `source` files and have it work.

Also I prefer to use Fish only as an interactive shell, actual scripts can stay bash.

Most scripts are run, not sourced. Some tools support fish. bass[1] aims to handle the rest.

[1] https://github.com/edc/bass

Where things get problematic is with commands that send a set of environment variables to stdout, like

    eval $(ssh-agent)
Sure you can get addons (like bass[0]) that will translate the sh environment variable settings to fish, but it’s a pain to have to do that (and remember wth it was called).

[0] https://github.com/edc/bass

I've had success with bass[1]. Typically, I use it when some kind of tool requires sourcing bash scripts.

[1] https://github.com/edc/bass

If there is anything I would personally like to see it’s the bass plugin rolled into the shell itself to make transitions for bash and some esoteric edge cases easier to handle https://github.com/edc/bass

Maybe adopt a package manager for plugins too? ;)

The Bass wrapper script can help with some of the incompatibilities:

https://github.com/edc/bass

You can use bass which solves this problem without porting the script to fish: https://github.com/edc/bass
Fish is optimized for interactive (the i in "fish") use. Not exactly the same as bash-compliance, but if you have bash-based tools (like virtualenv but without counterpart in fish land), check out https://github.com/edc/bass. Bass allows you to use a bash tool in fish, by running the tool in bash and transporting changes in environment variables back to fish shell.
> that leaves shell-integration scripts: virtualenv, rbenv, etc. Supporting that stuff is one of the most common requests that the fish shell gets, and one of the most commonly cited reasons for not using fish.

shameless plug, but I made a utility to solve the problem: https://github.com/edc/bass

So you can write `bass source /usr/local/bin/virtualenvwrapper.sh ';' mkvirtualenv env1`, which of course can be shortened with a function.