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

7 lines
172 B
Bash
Executable File

#!/usr/bin/env bash
#
# Remove a directory from the PATH
# Usage: x-path-remove <dir>
export PATH=$(echo -n "$PATH" | awk -v RS=: -v ORS=: "\$0 != \"$1\"" | sed 's/:$//')