zshenv,zprofile: add to path more wisely

This commit is contained in:
surtur 2023-08-18 17:09:44 +02:00
parent 54bff9985c
commit 12dddf410c
Signed by: wanderer
SSH Key Fingerprint: SHA256:MdCZyJ2sHLltrLBp0xQO0O1qTW9BT/xl5nXkDvhlMCI
2 changed files with 43 additions and 33 deletions

@ -5,23 +5,25 @@ export CGO_ENABLED="1"
HMVARSFILE="$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh" HMVARSFILE="$HOME/.nix-profile/etc/profile.d/hm-session-vars.sh"
if [ -f "$HMVARSFILE" ]; then . "$HMVARSFILE"; fi if [ -f "$HMVARSFILE" ]; then . "$HMVARSFILE"; fi
add_to_path() {
local p=$1
if [[ ! "$PATH" == *"$p"* ]]; then
export PATH="$p:$PATH"
fi
}
add_to_path "/usr/local/goroot/bin" local __paths=(
add_to_path "$HOME/.asdf/shims" "/usr/local/goroot/bin"
add_to_path "$HOME/.arkade/bin" "$HOME/.asdf/shims"
add_to_path "$HOME/.cargo/bin" "$HOME/.arkade/bin"
add_to_path "$GOPATH/bin" "$HOME/.cargo/bin"
add_to_path "/opt/metasploit-framework/bin" "$GOPATH/bin"
add_to_path "$HOME/.local/share/flatpak/exports/bin" "/opt/metasploit-framework/bin"
add_to_path "/var/lib/flatpak/exports/bin" "$HOME/.local/share/flatpak/exports/bin"
add_to_path "$HOME/.local/share/JetBrains/Toolbox/bin" "/var/lib/flatpak/exports/bin"
add_to_path "$HOME/.local/share/JetBrains/Toolbox/scripts" "$HOME/.local/share/JetBrains/Toolbox/bin"
"$HOME/.local/share/JetBrains/Toolbox/scripts"
)
for p in $__paths[@]; do
add_to_path $p
done
unset __paths
export EDITOR='vim' export EDITOR='vim'
export TERM='xterm-256color' export TERM='xterm-256color'

42
.zshenv

@ -29,20 +29,28 @@ add_to_path() {
fi fi
} }
add_to_path "/usr/lib64/ccache" local __paths=(
add_to_path "$ANDROID_SDK_ROOT/platform-tools" "/usr/lib64/ccache"
add_to_path "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin" "$ANDROID_SDK_ROOT/platform-tools"
add_to_path "$ANDROID_SDK_ROOT/tools" "$ANDROID_SDK_ROOT/cmdline-tools/latest/bin"
add_to_path "$ANDROID_SDK_ROOT/tools/bin" "$ANDROID_SDK_ROOT/tools"
add_to_path "$HOME/.local/share/JetBrains/Toolbox/bin" "$ANDROID_SDK_ROOT/tools/bin"
add_to_path "$HOME/.npm-packages/bin" "$HOME/.local/share/JetBrains/Toolbox/bin"
add_to_path "/var/lib/flatpak/exports/bin" "$HOME/.npm-packages/bin"
add_to_path "$HOME/.local/share/flatpak/exports/bin" "/var/lib/flatpak/exports/bin"
add_to_path "/opt/metasploit-framework/bin" "$HOME/.local/share/flatpak/exports/bin"
add_to_path "$HOME/.cargo/bin" "/opt/metasploit-framework/bin"
add_to_path "$GOPATH/bin" "$HOME/.cargo/bin"
add_to_path "$HOME/.arkade/bin" "$GOPATH/bin"
add_to_path "$HOME/.asdf/bin" "$HOME/.arkade/bin"
add_to_path "$HOME/.asdf/shims" "$HOME/.asdf/bin"
add_to_path "$HOME/.local/bin" "$HOME/.asdf/shims"
add_to_path "$HOME/utils/bin" "$HOME/.local/bin"
"$HOME/utils/bin"
)
for p in $__paths[@]; do
add_to_path $p
done
unset __paths