|
6 months ago | |
---|---|---|
envpath | 1 year ago | |
npm | 1 year ago | |
tools | 1 year ago | |
vendor | 1 year ago | |
winpath | 1 year ago | |
.gitignore | 1 year ago | |
LICENSE | 1 year ago | |
README.md | 6 months ago | |
build-all.sh | 1 year ago | |
go.mod | 1 year ago | |
go.sum | 1 year ago | |
pathman.go | 1 year ago | |
pathman_unixes.go | 1 year ago | |
pathman_windows.go | 1 year ago |
Manage PATH on Windows 10, Mac, and Linux with various Shells
pathman list
pathman add ~/.local/bin
pathman remove ~/.local/bin
pathman version
pathman help
Where is the PATH managed?
PATH
in the registry.PATH
in ~/.config/envman/PATH.env
Note for Windows 10 users: due to differences in how cmd.exe
, PowerShell, and pathman
use and interpret strings, spaces, paths, and variables, you'll get more consistent results if you:
~
rather than %USERPROFILE%
or $Env:USERPROFILE
/
rather than \
for delimiting pathsMac, Linux:
curl -s https://webinstall.dev/pathman | bash
Windows 10:
This can be run from cmd.exe
or PowerShell (curl.exe
is a native part of Windows 10).
curl.exe -sA "MS" https://webinstall.dev/pathman | powershell
PATH
Or install via npm
:
npm install -g pathman
mkdir %userprofile%\bin
move pathman.exe %userprofile%\bin\pathman.exe
%userprofile%\bin\pathman.exe add ~/bin
mkdir -p ~/.local/bin
mv ./pathman ~/.local/bin
pathman add ~/.local/bin
MacOS (darwin): 64-bit Download
curl https://rootprojects.org/pathman/dist/darwin/amd64/pathman -o pathman
chmod +x ./pathman
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 (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
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
pathman add ~/.local/bin
Saved PATH changes. To set the PATH immediately, update the current session:
export PATH="/Users/me/.local/bin:$PATH"
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"
pathman list
pathman-managed PATH entries:
$HOME/.local/bin
other PATH entries:
/usr/local/bin
/usr/bin
/bin
/usr/sbin
/sbin
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.
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