https://github.com/itspriddle/path_helper
A Golang implementation of the OS X path_helper utility
https://github.com/itspriddle/path_helper
Last synced: about 1 year ago
JSON representation
A Golang implementation of the OS X path_helper utility
- Host: GitHub
- URL: https://github.com/itspriddle/path_helper
- Owner: itspriddle
- Created: 2015-03-08T18:24:28.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2015-03-14T05:06:47.000Z (over 11 years ago)
- Last Synced: 2025-01-20T16:54:30.400Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 112 KB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.markdown
Awesome Lists containing this project
README
# path_helper.go
This is a Golang implementation of the OS X [`path_helper`][path_helper]
utility.
[path_helper]: https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man8/path_helper.8.html
## Usage
First setup one or more path files. A path file contains one directory per line
that should be added to `PATH`. Eg:
```
/usr/local/bin
/usr/bin
/bin
```
Add the following to your `.bashrc` or `.zshrc` file:
```
eval $(path_helper ~/.paths)
```
If you have multiple path files specify them as arguments:
```
eval $(path_helper /etc/paths /etc/paths.d/*)
```
## Installation
Clone this repo:
```
git clone https://github.com/itspriddle/path_helper.git
```
Build and install:
```
make
make install
```
If you want to install somewhere other than `/usr/local/bin`, supply `PREFIX`:
```
make
PREFIX=$HOME/local make install
```