{"id":20855888,"url":"https://github.com/danass/add-to-path","last_synced_at":"2026-04-24T06:33:06.992Z","repository":{"id":185347181,"uuid":"673392212","full_name":"danass/Add-to-path","owner":"danass","description":"Easily Add or Remove the Current Directory to the $PATH in Bash","archived":false,"fork":false,"pushed_at":"2024-10-29T16:55:44.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-27T15:58:56.001Z","etag":null,"topics":["bash","bash-script","environment-variables","path"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/danass.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":"2023-08-01T14:17:38.000Z","updated_at":"2024-10-29T16:57:07.000Z","dependencies_parsed_at":"2025-03-12T13:41:29.023Z","dependency_job_id":"e13382e8-4578-4cab-aabc-12fb7e494927","html_url":"https://github.com/danass/Add-to-path","commit_stats":null,"previous_names":["danass/atp","danass/add-to-path"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/danass/Add-to-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danass%2FAdd-to-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danass%2FAdd-to-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danass%2FAdd-to-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danass%2FAdd-to-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/danass","download_url":"https://codeload.github.com/danass/Add-to-path/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/danass%2FAdd-to-path/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32212806,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-24T03:15:14.334Z","status":"ssl_error","status_checked_at":"2026-04-24T03:15:11.608Z","response_time":64,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","environment-variables","path"],"created_at":"2024-11-18T04:26:11.917Z","updated_at":"2026-04-24T06:33:06.974Z","avatar_url":"https://github.com/danass.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Easily Add or Remove the Current Directory to the `$PATH` in Bash\n\nThis simple utility allows you to quickly add or remove the **current directory** to the global `$PATH` in Bash, making it accessible from anywhere.\n\nTo use this tool, simply add the content of the [atp.sh](https://github.com/danass/Add-to-path/blob/main/atp.sh) script to your **~/.bashrc** file, then source the file to activate the function.\n\n## Usage Instructions\n\n### 1. Adding the Current Directory to `$PATH`\n\nTo temporarily add the current directory to the `$PATH`, run:\n\n```bash\nuser@machine:~/current-directory$ atp .\n```\n\nNow, when you check `$PATH`, you should see `/home/user/current-directory` (or the directory you are currently in) added to the end of the path:\n\n```bash\nuser@machine:~/current-directory$ echo $PATH\n/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/user/current-directory\n```\n\n### 2. Removing the Current Directory from `$PATH`\n\nTo remove the current directory from the `$PATH`, use:\n\n```bash\nuser@machine:~/current-directory$ atp -r .\n```\n\nAfter running this command, the `$PATH` will return to its previous state, without the current directory:\n\n```bash\nuser@machine:~/current-directory$ echo $PATH\n/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n```\n\n---\n\n### And that’s it!\n\nWith just two simple commands, you can add or remove the current directory from your `$PATH`. This is especially useful for testing or running scripts without needing to permanently modify the global `$PATH`.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanass%2Fadd-to-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdanass%2Fadd-to-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdanass%2Fadd-to-path/lists"}