aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zprofile
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.zprofile')
-rwxr-xr-xzsh/.zprofile30
1 files changed, 16 insertions, 14 deletions
diff --git a/zsh/.zprofile b/zsh/.zprofile
index 0980794..9850aae 100755
--- a/zsh/.zprofile
+++ b/zsh/.zprofile
@@ -20,43 +20,45 @@ export MTP_NO_PROBE="1"
export XDG_CONFIG_HOME="$HOME/.config"
-export PATH="$HOME/.local/bin:$PATH"
+[ -d "$HOME/.local/bin" ] && \
+ export PATH="$HOME/.local/bin:$PATH"
+[ -d "$HOME/.bin" ] && \
+ export PATH="$HOME/.bin:$PATH"
+[ -d "$HOME/bin" ] && \
+ export PATH="$HOME/bin:$PATH"
# Android SDK
if [ -d "$HOME/.local/share/android-sdk" ]; then
- export ANDROID_HOME="$HOME/.local/share/android-sdk"
- export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin:$PATH"
+ export ANDROID_HOME="$HOME/.local/share/android-sdk"
+ export PATH="$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools/bin:$PATH"
fi
-# bin
-export PATH="$HOME/.bin:$PATH"
-
# Go
if type "go" > /dev/null; then
- export PATH="$HOME/go/bin:$PATH"
- export GOPATH=$(go env GOPATH)
+ export PATH="$HOME/go/bin:$PATH"
+ export GOPATH=$(go env GOPATH)
fi
# Rust
if type "rustc" > /dev/null; then
- export PATH="$HOME/.cargo/bin:$PATH"
- export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
+ export PATH="$HOME/.cargo/bin:$PATH"
+ export RUST_SRC_PATH="$(rustc --print sysroot)/lib/rustlib/src/rust/src"
fi
# Node
if type "npm" > /dev/null; then
- export PATH="$HOME/.node_modules/bin:$PATH"
- export npm_config_prefix=~/.node_modules
+ export PATH="$HOME/.node_modules/bin:$PATH"
+ export npm_config_prefix=~/.node_modules
fi
# Ruby
if type "ruby" > /dev/null; then
- export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
+ export PATH="$PATH:$(ruby -e 'puts Gem.user_dir')/bin"
fi
# fzf
if type "fzf" > /dev/null && type "rg" > /dev/null; then
- export FZF_DEFAULT_COMMAND="rg --hidden --follow --ignore-vcs --files --iglob '\!.git'"
+ export FZF_DEFAULT_COMMAND="rg --hidden --follow --ignore-vcs --files --iglob '\!.git'"
fi
# Aliases