{"id":16540213,"url":"https://github.com/rickstaa/.pathmod","last_synced_at":"2026-05-12T04:37:39.692Z","repository":{"id":49320241,"uuid":"232123146","full_name":"rickstaa/.pathmod","owner":"rickstaa","description":"A bash script that makes it easier to view and modify the PATH and PYTHONPATH environment variables","archived":false,"fork":false,"pushed_at":"2022-07-24T11:15:55.000Z","size":45,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-14T07:32:33.215Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/rickstaa.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["rickstaa"],"patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"custom":null}},"created_at":"2020-01-06T14:54:42.000Z","updated_at":"2022-07-24T08:38:17.000Z","dependencies_parsed_at":"2022-07-25T23:49:49.578Z","dependency_job_id":null,"html_url":"https://github.com/rickstaa/.pathmod","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2F.pathmod","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2F.pathmod/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2F.pathmod/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rickstaa%2F.pathmod/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rickstaa","download_url":"https://codeload.github.com/rickstaa/.pathmod/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241774235,"owners_count":20018235,"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-10-11T18:51:50.636Z","updated_at":"2025-12-03T07:05:34.691Z","avatar_url":"https://github.com/rickstaa.png","language":"Shell","funding_links":["https://github.com/sponsors/rickstaa"],"categories":[],"sub_categories":[],"readme":"# Path modification bash script\n\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/231df26fd0b3457c94a165f0cb832d61)](https://www.codacy.com/gh/rickstaa/.pathmod/dashboard?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=rickstaa/.pathmod\u0026utm_campaign=Badge_Grade)\n[![Maintained](https://img.shields.io/badge/Maintained%3F-yes-green)](https://github.com/rickstaa/pathmod/pulse)\n[![Contributions](https://img.shields.io/badge/contributions-welcome-orange.svg)](contributing.md)\n![Supported shells](https://img.shields.io/badge/Supported%20shells-bash-blue)\n\n\u003cimg src=\"https://raw.githubusercontent.com/rickstaa/.pathmod/master/assets/icons/pathmod_icon.svg?raw=true\" width=\"200\"\u003e\nThe pathmod bash script makes it easier to view and modify the PATH and PYTHONPATH environment variables. It comes with an easy command-line interface which allows you to:\n\n-   Display the paths that are on the PATH and PYTHONPATH in a more readable format.\n-   Check whether a path is on the PATH or PYTHON.\n-   Delete a path from the PATH or PYTHONPATH.\n-   Add a path from the PATH or PYTHONPATH.\n-   Move a path to a different position in the PATH or PYTHONPATH.\n\n## How to setup\n\n### Automatic installation\n\n1.  Clone the repository to your user home directory and cd into the `.pathmod` folder.\n\n    ```bash\n    git clone https://github.com/rickstaa/.pathmod.git\n    cd .pathmod\n    ```\n\n2.  Run the `install.sh` script to install the ROS Conda wrapper.\n\n### Manual installation\n\n1.  Create a symbolic link to the `.pathmod_rc` file:\n\n    ```bash\n    ln -fs \"$(pwd)/.pathmod_rc\" \"$(echo $HOME)/.pathmod_rc\"\n    ```\n\n2.  Add the following code at the end of your `.bashrc`.\n\n    ```sh\n    # \u003e\u003e\u003e pathmod initialize \u003e\u003e\n    ## Source pathmod script\n    if [ -f \"$HOME/.pathmod_rc\" ]; then\n     . \"$HOME/.pathmod_rc\"\n    fi\n    # \u003c\u003c\u003c pathmod initialize \u003c\u003c\u003c\n    ```\n\n## How to uninstall\n\nTo uninstall the pathmod script run the `uninstall.sh` script before removing the `.pathmod` repository.\n\n## How to use\n\n### Pathmod commands\n\nThe pathmod script takes the following commands:\n\n-   `-a --add`: Add path(s) to the PATH or PYTHONPATH\n-   `-i --index:` Specify the index where to add the path(s) (OPTIONAL: 0=start, -1=end, defaults to -1)\n-   `-m --move`: Move a path to a given index (Adds path if not yet present.)\n-   `-r --remove`: Remove path(s) from the PATH or PYTHONPATH\n-   `-c --check`: Check if path exists in the PATH or PYTHONPATH\n-   `-h --help`: Display help\n-   `-p --pythonpath`: Modify PYTHONPATH instead of PATH\n-   `-v, --version`: Show pathmod version\n-   `-s --settings`: List pathmod settings and the current PATH and PYTHONPATH\n-   `-sd --set-path-display`: Display PATH and PYTHONPATH after each command (OPTIONAL, defaults to false)\n-   `-se --set-export`: Export path after it is set (OPTIONAL, defaults to true)\n-   `-sg --set-path-guard`: Check whether a path is valid before adding it (OPTIONAL, defaults to false)\n\n:information_source: **NOTE:** Each option only accepts one argument at the same time. To add, remove or check multiple\npaths please use the colon (Example: `pathmod --\u003cOPTION\u003e \u003cPATH1\u003e:\u003cPATH2\u003e`) or space separator (Example: `pathmod --\u003cOPTION\u003e \"\u003cPATH1\u003e \u003cPATH2\u003e\"`).\n\n#### Examples\n\n##### Add path to PATH variable\n\n```bash\npathmod --add \u003cPATH\u003e\n```\n\n##### Add path to PATH at an index\n\n```bash\npathmod --add \u003cPATH\u003e --index \u003cINDEX\u003e\n```\n\n##### Remove path from PATH variable\n\n```bash\npathmod --remove \u003cPATH\u003e\npathmod --remove \u003cINDEX\u003e\n```\n\n##### Check if path exists in PATH variable\n\n```bash\npathmod --exists \u003cPATH\u003e\n```\n\n##### Move path to a given index\n\n```bash\npathmod --move \u003cPATH\u003e --index \u003cINDEX\u003e\npathmod --move \u003cOLD_INDEX\u003e --index \u003cNEW_INDEX\u003e\n```\n\n##### Add path from PYTHONPATH variable\n\n```bash\npathmod --pythonpath --add \u003cPATH\u003e\n```\n\n## Issues\n\nPlease feel free to open [an issue](https://github.com/rickstaa/.pathmod/issues) if you run into problems or have suggestions.\n\n## Contributing\n\nFeel free to open an issue if you have ideas on how to make this GitHub action better or if you want to report a bug! All contributions are welcome. :rocket: Please consult the [contribution guidelines](CONTRIBUTING.md) for more information.\n\n## License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2F.pathmod","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frickstaa%2F.pathmod","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frickstaa%2F.pathmod/lists"}