mirror of
https://github.com/js0ny/dotfiles.git
synced 2025-12-21 08:43:00 +00:00
fix(zsh): Cleanup environment variable
This commit is contained in:
parent
567c8d1b3b
commit
9436322a73
4 changed files with 24 additions and 5 deletions
|
|
@ -33,6 +33,15 @@ export PAGER="less -R"
|
|||
export EDITOR="nvim"
|
||||
export VISUAL="nvim"
|
||||
|
||||
# Minimal PATH for early commands
|
||||
export PATH="/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:$PATH"
|
||||
|
||||
if [ -d "/opt/homebrew/bin" ]; then # macOS
|
||||
export PATH="/opt/homebrew/bin:$PATH"
|
||||
elif [ -d "/home/linuxbrew/.linuxbrew/bin" ]; then # Linux
|
||||
export PATH="/home/linuxbrew/.linuxbrew/bin:$PATH"
|
||||
fi
|
||||
|
||||
# macOS Specific
|
||||
# This syntax is POSIX standard, for portability
|
||||
if [ "$(uname)" = "Darwin" ]; then
|
||||
|
|
@ -52,6 +61,7 @@ fi
|
|||
# Cargo
|
||||
if command -v cargo > /dev/null; then
|
||||
export CARGO_HOME="$XDG_DATA_HOME"/cargo
|
||||
export PATH="$CARGO_HOME/bin:$PATH"
|
||||
fi
|
||||
# CGDB
|
||||
if command -v cgdb > /dev/null; then
|
||||
|
|
@ -60,6 +70,7 @@ fi
|
|||
# .NET
|
||||
if command -v dotnet > /dev/null; then
|
||||
export DOTNET_CLI_HOME="$XDG_DATA_HOME"/dotnet
|
||||
export PATH="$DOTNET_CLI_HOME/.dotnet/tools:$PATH"
|
||||
fi
|
||||
# Docker
|
||||
if command -v docker > /dev/null; then
|
||||
|
|
@ -72,6 +83,7 @@ fi
|
|||
# Go
|
||||
if command -v go > /dev/null; then
|
||||
export GOPATH="$XDG_DATA_HOME"/go
|
||||
export PATH="$GOPATH/bin:$PATH"
|
||||
fi
|
||||
# Julia
|
||||
if command -v julia > /dev/null; then
|
||||
|
|
@ -100,6 +112,17 @@ if command -v screen > /dev/null; then
|
|||
export SCREENRC="$XDG_CONFIG_HOME"/screen/screenrc
|
||||
export SCREENDIR="${XDG_RUNTIME_DIR}/screen"
|
||||
fi
|
||||
# Ruby Gem
|
||||
# Ruby Gem
|
||||
if command -v gem > /dev/null; then
|
||||
setopt nullglob
|
||||
for dir in "$HOME/.local/share/gem/ruby/"*/bin; do
|
||||
if [ -d "$dir" ]; then
|
||||
export PATH="$dir:$PATH"
|
||||
fi
|
||||
done
|
||||
unsetopt nullglob
|
||||
fi
|
||||
# Spacemacs
|
||||
if command -v emacs > /dev/null; then
|
||||
export SPACEMACSDIR="$XDG_CONFIG_HOME"/spacemacs
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue