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-10 23:06:51 -0500
commit82f8607df7ff29f5a8f179e81a96c49bab4ff185 (patch)
treec5f5bb4655bd1717d06257ebb58e311843c0c32a /zsh
parent5f136203cc781ed2195fa5e885d60fbbcc39ea61 (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