From efc83eb6b976dcca2bf890779c32d07f8800c210 Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 10 Jul 2023 23:05:43 -0500 Subject: Update path setting to be what it probably should have been --- zsh/.zshenv | 45 +++++++++++++++++++++++++++------------------ 1 file changed, 27 insertions(+), 18 deletions(-) (limited to 'zsh') diff --git a/zsh/.zshenv b/zsh/.zshenv index 306e77f..3555130 100644 --- a/zsh/.zshenv +++ b/zsh/.zshenv @@ -1,10 +1,13 @@ +# Import ENV from system +. /etc/profile +[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh + unset HISTFILE # Other XDG paths export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} - [ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" # Doesn't seem to work @@ -83,50 +86,56 @@ export SRCDIR="$HOME/.local/src" # KSH export ENV="$XDG_CONFIG_HOME/mksh/mkshrc" -# PATH +# OLD PATH +export SYSPATH="$PATH" + +# NEW PATH +unset PATH if [ -d "$HOME/.local/bin/testing" ]; then - export PATH="$HOME/.local/bin/testing" + PATH="$HOME/.local/bin/testing" fi if [ -d "$HOME/.local/bin/shortcmds" ]; then - export PATH="$PATH:$HOME/.local/bin/shortcmds" + PATH="$PATH:$HOME/.local/bin/shortcmds" fi if [ -d "$HOME/.local/bin/generics" ]; then - export PATH="$PATH:$HOME/.local/bin/generics" + PATH="$PATH:$HOME/.local/bin/generics" fi if [ -d "$HOME/.local/bin/scripts" ]; then - export PATH="$PATH:$HOME/.local/bin/scripts" + PATH="$PATH:$HOME/.local/bin/scripts" fi if [ -d "$HOME/.local/bin/sp" ]; then - export PATH="$PATH:$HOME/.local/bin/sp" + PATH="$PATH:$HOME/.local/bin/sp" fi if [ -d "$HOME/.local/bin/blocks" ]; then - export PATH="$PATH:$HOME/.local/bin/blocks" + PATH="$PATH:$HOME/.local/bin/blocks" fi if [ -d "$HOME/.local/bin/ignore" ]; then - export PATH="$PATH:$HOME/.local/bin/ignore" + PATH="$PATH:$HOME/.local/bin/ignore" fi if [ -d "$HOME/local/bin/volsv" ]; then - export PATH="$PATH:$HOME/.local/volsv" + PATH="$PATH:$HOME/.local/volsv" fi if [ -d "$HOME/.local/bin" ]; then - export PATH="$PATH:$HOME/.local/bin" + PATH="$PATH:$HOME/.local/bin" fi if [ -d "$HOME/.local/bin/flatpak-sc" ]; then - export PATH="$PATH:$HOME/.local/bin/flatpak-sc" + PATH="$PATH:$HOME/.local/bin/flatpak-sc" fi if [ -d "$HOME/.local/bin/flatpak/exports/bin" ]; then - export PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" + PATH="$PATH:$HOME/.local/share/flatpak/exports/bin/" fi if [ -d "$CARGO_HOME/bin" ]; then - export PATH="$PATH:$CARGO_HOME/bin" + PATH="$PATH:$CARGO_HOME/bin" fi if [ -d "$GOPATH/bin" ]; then - export PATH="$PATH:$GOPATH/bin" + PATH="$PATH:$GOPATH/bin" fi if [ -d "/var/lib/flatpak/exports/bin" ]; then - export PATH="$PATH:/var/lib/flatpak/exports/bin" + PATH="$PATH:/var/lib/flatpak/exports/bin" fi -[ -f "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" ] && . "${XDG_CONFIG_HOME:-$HOME/.config}/user-dirs.dirs" +# MERGE PATHS +export PATH="$PATH:$SYSPATH" -[ -f /etc/profile.d/nix-daemon.sh ] && . /etc/profile.d/nix-daemon.sh +# CLEANUP +unset SYSPATH -- cgit v1.2.3