summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
authorzachir <zachir@librem.one>2023-07-10 23:05:43 -0500
committerzachir <zachir@librem.one>2023-07-18 00:17:40 -0500
commited8855da306014d41b1bb560d36b2ac75fcd36e4 (patch)
tree834e28814fb9c2bc1bd25dfea56895c8caaeb514 /zsh
parentbcf103022b405c05ea03253586c7b725b08fc7b2 (diff)
Update path setting to be what it probably should have been
Diffstat (limited to 'zsh')
-rw-r--r--zsh/.zshenv43
1 files changed, 26 insertions, 17 deletions
diff --git a/zsh/.zshenv b/zsh/.zshenv
index 70b37b1..1840082 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
@@ -78,42 +81,46 @@ 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" ]; 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 "/opt/REAPER" ]; then
export PATH="$PATH:/opt/REAPER"
@@ -128,7 +135,7 @@ if [ -d "/opt/safing/portmaster" ]; then
export PATH="$PATH:/opt/safing/portmaster"
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
if [ -d "/usr/bin" ]; then
export PATH="$PATH:/usr/bin"
@@ -143,6 +150,8 @@ if [ -d "/sbin" ]; then
export PATH="$PATH:/sbin"
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