Manage PATH on Windows, Mac, and Linux with various Shells
Go to file
AJ ONeal 520c4a3b22 refactor a little 2019-08-09 03:39:18 -06:00
envpath bugfixes for windows and git bash 2019-07-28 05:03:44 -06:00
npm refactor a little 2019-08-09 03:39:18 -06:00
tools v0.5.0: initial publishable version 2019-07-28 04:04:53 -06:00
vendor add deps 2019-07-28 04:05:11 -06:00
winpath bugfixes for windows and git bash 2019-07-28 05:03:44 -06:00
.gitignore go generate version 2019-07-28 04:08:45 -06:00
LICENSE Initial commit 2019-07-22 04:21:08 +00:00
README.md make chmod instruction more obvious 2019-07-28 05:15:25 -06:00
build-all.sh remove debug version references 2019-07-28 05:11:15 -06:00
go.mod v0.5.0: initial publishable version 2019-07-28 04:04:53 -06:00
go.sum v0.5.0: initial publishable version 2019-07-28 04:04:53 -06:00
pathman.go bugfixes for windows and git bash 2019-07-28 05:03:44 -06:00
pathman_unixes.go bugfixes for windows and git bash 2019-07-28 05:03:44 -06:00
pathman_windows.go bugfixes for windows and git bash 2019-07-28 05:03:44 -06:00

README.md

pathman

Manage PATH on Windows, Mac, and Linux with various Shells

pathman list
pathman add ~/.local/bin
pathman remove ~/.local/bin
pathman version
pathman help

Windows: stores PATH in the registry.

Mac & Linux: stores PATH in ~/.config/envman/PATH.sh

Downloads

MacOS

MacOS (darwin): 64-bit Download

curl https://rootprojects.org/pathman/dist/darwin/amd64/pathman -o pathman
chmod +x ./pathman

Windows

See download options Windows 10: [64-bit Download](https://rootprojects.org/pathman/dist/windows/amd64/pathman.exe)
powershell.exe $ProgressPreference = 'SilentlyContinue'; Invoke-WebRequest https://rootprojects.org/pathman/dist/windows/amd64/pathman.exe -OutFile pathman.exe

Windows 7: 32-bit Download

powershell.exe "(New-Object Net.WebClient).DownloadFile('https://rootprojects.org/pathman/dist/windows/386/pathman.exe', 'pathman.exe')"

Linux

See download options

Linux (64-bit): Download

curl https://rootprojects.org/pathman/dist/linux/amd64/pathman -o pathman
chmod +x ./pathman

Linux (32-bit): Download

curl https://rootprojects.org/pathman/dist/linux/386/pathman -o pathman
chmod +x ./pathman

Raspberry Pi (Linux ARM)

See download options

RPi 4 (64-bit armv8): Download

curl https://rootprojects.org/pathman/dist/linux/armv8/pathman -o pathman`
chmod +x ./pathman

RPi 3 (armv7): Download

curl https://rootprojects.org/pathman/dist/linux/armv7/pathman -o pathman
chmod +x ./pathman

ARMv6: Download

curl https://rootprojects.org/pathman/dist/linux/armv6/pathman -o pathman
chmod +x ./pathman

RPi Zero (armv5): Download

curl https://rootprojects.org/pathman/dist/linux/armv5/pathman -o pathman
chmod +x ./pathman

Add to PATH

Windows

mkdir %userprofile%\bin
move pathman.exe %userprofile%\bin\pathman.exe
%userprofile%\bin\pathman.exe add ~\bin

All Others

mkdir -p ~/.local/bin
mv ./pathman ~/.local/bin
pathman add ~/.local/bin

add

pathman add ~/.local/bin
Saved PATH changes. To set the PATH immediately, update the current session:

	export PATH="/Users/me/.local/bin:$PATH"

remove

pathman remove ~/.local/bin
Saved PATH changes. To set the PATH immediately, update the current session:

	export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin"

list

pathman list
pathman-managed PATH entries:

	$HOME/.local/bin

other PATH entries:

	/usr/local/bin
	/usr/bin
	/bin
	/usr/sbin
	/sbin

Windows

You can use ~ as a shortcut for %USERPROFILE%.

pathman add ~\.local\bin

The registry will be used, even when your using Node Bash, Git Bash, or MINGW.

build

git clone https://git.rootprojects.org/root/pathman.git
go mod tidy
go mod vendor
go generate -mod=vendor ./...
go build -mod=vendor
./pathman list