diff options
author | zachir <zachir@librem.one> | 2023-07-10 23:05:43 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2023-07-10 23:05:43 -0500 |
commit | efc83eb6b976dcca2bf890779c32d07f8800c210 (patch) | |
tree | ee30c677ffb9179bc5a87368b664b4d3c57fcee0 | |
parent | 2fe4555960de1179a1b7e3a69f2634e712c06113 (diff) |
Update path setting to be what it probably should have been
-rw-r--r-- | zsh/.zshenv | 45 |
1 files changed, 27 insertions, 18 deletions
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 |