{"id":13477036,"url":"https://github.com/edc/bass","last_synced_at":"2025-05-15T07:07:49.422Z","repository":{"id":28782487,"uuid":"32305146","full_name":"edc/bass","owner":"edc","description":"Make Bash utilities usable in Fish shell","archived":false,"fork":false,"pushed_at":"2023-12-16T23:50:52.000Z","size":72,"stargazers_count":2291,"open_issues_count":13,"forks_count":71,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-04-14T13:03:07.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/edc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-03-16T06:14:04.000Z","updated_at":"2025-04-14T08:44:34.000Z","dependencies_parsed_at":"2024-10-09T16:41:19.936Z","dependency_job_id":"3028cbcf-d8de-4f85-a9b6-7b9f58c988f6","html_url":"https://github.com/edc/bass","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edc%2Fbass","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edc%2Fbass/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edc%2Fbass/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/edc%2Fbass/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/edc","download_url":"https://codeload.github.com/edc/bass/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254292043,"owners_count":22046426,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-31T16:01:37.463Z","updated_at":"2025-05-15T07:07:44.405Z","avatar_url":"https://github.com/edc.png","language":"Python","readme":"# Bass\n\n![](https://travis-ci.org/edc/bass.svg?branch=master)\n\nBass makes it easy to use utilities written for Bash in [fish shell](https://github.com/fish-shell/fish-shell/).\n\nRegular bash scripts can be used in fish shell just as scripts written in any language with proper shebang or explicitly using the interpreter (i.e. using `bash script.sh`). However, many utilities, such as virtualenv, modify the shell environment and need to be sourced, and therefore cannot be used in fish. Sometimes, counterparts (such as the excellent [virtualfish](http://virtualfish.readthedocs.org/en/latest/)) are created, but that's often not the case.\n\nBass is created to make it possible to use bash utilities in fish shell without any modification. It works by capturing what environment variables are modified by the utility of interest, and replay the changes in fish.\n\nYou might not need Bass for simple use cases. A great simple alternative (suggested by @jorgebucaran) is to just use `exec bash -c \"source some-bash-setup.sh; exec fish\"`.\n\n# Installation\n\nBass is compatible with fish versions 2.6.0 and later.\n\n\n## Manually\n\nUse the Makefile.\n\n`make install` will copy two files to `~/.config/fish/functions/`.\n\n`make uninstall` will remove those two files.\n\nRelaunch the shell for the change to take effect.\n\n## With [Oh My Fish](https://github.com/oh-my-fish/oh-my-fish)\n\n```console\nomf install bass\n```\n\n## With [Fisher](https://github.com/jorgebucaran/fisher)\n\n```console\nfisher install edc/bass\n```\n\n## With [Fundle](https://github.com/tuvistavie/fundle)\n\nAdd\n\n```console\nfundle plugin 'edc/bass'\n```\n\nto your fish config, relaunch the shell and run `fundle install`.\n\n# Example\n\nBass is simple to use. Just prefix your bash utility command with `bass`:\n\n```\n\u003e bass export X=3\n\u003e echo $X\n3\n```\n\nNotice that `export X=3` is bash syntax. Bass \"transported\" the new bash\nenvironment variable back to fish.\n\nBass has a debug option so you can see what happened:\n\n```\n\u003e bass -d export X=4\n# updating X=3 -\u003e 4\nset -g -x X 4\n```\n\n## nvm\n\nHere is a more realistic example, using the excellent\n[nvm](https://github.com/creationix/nvm):\n\n```\n\u003e bass source ~/.nvm/nvm.sh --no-use ';' nvm use iojs\nNow using io.js v1.1.0\n```\n\nNote that semicolon is quoted to avoid being consumed by fish.\n\nThis example takes advantage of the nvm bash utility to switch to iojs.\nAfter the command, iojs is accessible:\n\n```\n\u003e which iojs\n/Users/edc/.nvm/versions/io.js/v1.1.0/bin/iojs\n```\n\nYou can then very easily pack the command as a function and feel more at home:\n\n```\n\u003e funced nvm\nnvm\u003e function nvm\n           bass source ~/.nvm/nvm.sh --no-use ';' nvm $argv\n       end\n\n\u003e nvm list\n-\u003e  iojs-v1.1.0\n         system\n\u003e nvm ls-remote\n        v0.1.14\n        v0.1.15\n        \n\u003e funcsave nvm\n...\n```\n\n(`--no-use` is an important option to `nvm.sh`. See [#13](https://github.com/edc/bass/issues/13) for background.)\n","funding_links":[],"categories":["Python","Plugins","others","Shell"],"sub_categories":["work like bash","PCAP"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedc%2Fbass","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fedc%2Fbass","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fedc%2Fbass/lists"}