aboutsummaryrefslogtreecommitdiffstats
path: root/zsh/.zprofile
diff options
context:
space:
mode:
authorPeter Son Struschka <me@peter-struschka.com>2020-05-16 23:56:17 +0800
committerPeter Son Struschka <me@peter-struschka.com>2020-05-16 23:56:17 +0800
commitbc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e (patch)
tree90a653557f2a88f518ca245ce28e9d26ff438388 /zsh/.zprofile
parent9f7d41ac7c4716e73e3f848ccadb80be483d875b (diff)
downloaddotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.tar.gz
dotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.tar.bz2
dotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.tar.lz
dotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.tar.xz
dotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.tar.zst
dotfiles-bc6e7acc104346beca4a4a39e4d1ba6cfdc8e88e.zip
zsh: loading prompt after checking `$TERM`
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