Files
dotfiles/local/bin/x-path-append

8 lines
179 B
Bash
Executable File

#!/usr/bin/env bash
#
# Add a directory to the beginning of the PATH if it's not already there.
# Usage: x-path-append <dir>
x-path-remove "$1"
export PATH="${PATH:+"$PATH:"}$1"