Configure function for adding paths to PATH env variable

This commit is contained in:
Fabio Scotto di Santolo
2025-08-21 22:50:16 +02:00
parent b0a50ef839
commit b2fcd1a3df

View File

@@ -1,7 +1,14 @@
function appendpath() {
local location="${1}"
case ":$PATH:" in case ":$PATH:" in
*":$HOME/.local/bin:"*) ;; *":$location:"*) ;;
*) export PATH="$HOME/.local/bin:$PATH" ;; *) export PATH="$PATH:$location" ;;
esac esac
}
appendpath "$HOME/.local/bin"
appendpath "$HOME/.config/emacs/bin"
unset appendpath
# XDG variables # XDG variables
export XDG_CONFIG_HOME=${HOME}/.config export XDG_CONFIG_HOME=${HOME}/.config