{"id":31796548,"url":"https://github.com/0komo/bash-source","last_synced_at":"2025-10-10T20:50:24.819Z","repository":{"id":167473950,"uuid":"643066363","full_name":"0komo/bash-source","owner":"0komo","description":"Improve Bash's `source` into more modular system.","archived":false,"fork":false,"pushed_at":"2023-05-23T21:05:53.000Z","size":2768,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-22T14:43:49.737Z","etag":null,"topics":["bash","bash-script","module-system"],"latest_commit_sha":null,"homepage":"https://urnightmaree.github.io/bash-source/","language":"Shell","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/0komo.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}},"created_at":"2023-05-20T02:27:50.000Z","updated_at":"2023-05-20T06:00:35.000Z","dependencies_parsed_at":"2023-12-06T11:14:38.914Z","dependency_job_id":"97eb78cb-7c33-47c9-a955-149409b87fb0","html_url":"https://github.com/0komo/bash-source","commit_stats":null,"previous_names":["urnightmaree/bash-source","komodcat/bash-source","komothecat/bash-source","cattokomo/bash-source","mbekkomo/bash-source","0komo/bash-source"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/0komo/bash-source","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0komo%2Fbash-source","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0komo%2Fbash-source/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0komo%2Fbash-source/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0komo%2Fbash-source/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0komo","download_url":"https://codeload.github.com/0komo/bash-source/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0komo%2Fbash-source/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279005267,"owners_count":26083864,"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","status":"online","status_checked_at":"2025-10-10T02:00:06.843Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","bash-script","module-system"],"created_at":"2025-10-10T20:50:11.604Z","updated_at":"2025-10-10T20:50:24.815Z","avatar_url":"https://github.com/0komo.png","language":"Shell","readme":"# bash-source\nImprove Bash's `source` into more modular system.\n\n## Why?\nBash's module system is so limited yet confusing, so I made this to cover Bash's module system problems by adding features that is already available in modern languages' module system.\n\nHow to use it?, it's very simple. Imagine that you have a `module.sh` in other directory, but you don't want to hardcode and type long path just to source it. This script helps you with that.\n\n```bash\n# /path/to/dir/module.sh\n\nmod() {\n    echo \"Hello world!\"\n}\n\nMOD=\"Hi Mom!\"\n```\n```bash\n# /path/to/main.sh\n\nsource source.sh # patch `source` and `.`\n\n# SOURCE_PATH is an array containing paths where script/package\n# will be find\nSOURCE_PATH+=(\"/path/to/dir/%s\")\n\nsource module.sh # loaded!\n\nmod\necho \"$MOD\"\n```\n```bash\n# output\nHello World!\nHi Mom!\n```\n\n## Features\n  - Custom path search and path searcher.\n  - Compatible with built-in `source`.\n  - Easy-to-setup inside new projects or already projects.\n\n## Installation\nDrop [source.sh](/source.sh) into your project and source it.\n```bash\nsource source.sh\n```\n\nYou can also patch to it to all Bash script by setting up `BASH_ENV` environment variable into the path where [source.sh](/source.sh) is placed, no need to source it again.\n```bash\nexport BASH_ENV=\"/path/to/source.sh\"\n```\n\nTo verify if it's working, put `source` into your script. The output should be like this.\n```\nsource: error: script name is required\n```\n\n## License\n\nbash-source is licensed under MIT license, see [LICENSE](/LICENSE) for more details.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0komo%2Fbash-source","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0komo%2Fbash-source","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0komo%2Fbash-source/lists"}