Small CLI utility to manage the PATH enironment variable.
Go to file
2024-01-19 22:02:52 +01:00
freebsd Initial release 2023-12-05 21:15:10 +01:00
src Dedupe output parts 2024-01-19 22:02:52 +01:00
submodules Initial release 2023-12-05 21:15:10 +01:00
tests Dedupe output parts 2024-01-19 22:02:52 +01:00
.gitignore Initial release 2023-12-05 21:15:10 +01:00
.gitmodules Initial release 2023-12-05 21:15:10 +01:00
CHANGELOG.md Initial release 2023-12-05 21:15:10 +01:00
LICENSE Initial release 2023-12-05 21:15:10 +01:00
Makefile Version bumped to 1.0.2 2023-12-05 21:18:56 +01:00
nim.cfg Initial release 2023-12-05 21:15:10 +01:00
nimble.lock Initial release 2023-12-05 21:15:10 +01:00
NOTICE.txt Initial release 2023-12-05 21:15:10 +01:00
pathsd.nimble Version bumped to 1.0.2 2023-12-05 21:18:56 +01:00
README.md Initial release 2023-12-05 21:15:10 +01:00

pathsd

pathsd is a small CLI utility to manage the PATH enironment variable.

Building and installing

pathsd is written in Nim programming language. To build it, you need to install the compiler. Consult nim documentation for instructions on installing nim on your OS. The required version is 2.0.0 or newer.

To build pathsd, issue the following command:

$ make

The built binary will be placed in build/pathsd. To install, copy it somewhere.

Usage

pathsd requires at least one directory of parts to operate on, e.g.

paths.d/
├── 01-bilbo
└── 02-homebrew

Each of the files should have one or more lines, each line being a single entry in the rendered PATH variable.

Running the program with such a directory would yield the following result:

$ pathsd paths.d/
export PATH="/Users/bilbo/opt/bin:/opt/homebrew/bin:/opt/homebrew/sbin":$PATH

You can specify multiple directories. They'll be processed one by one in the order specified on the command line.

The program is best used in your shell's startup file, e.g.

eval $(pathsd paths.d/)

At the time of writing, only bash is supported.

Author

pathsd is developed by Tomek Wójcik

License

pathsd is licensed under the MIT License.