summaryrefslogtreecommitdiff
path: root/zsh/.zshrc
diff options
context:
space:
mode:
Diffstat (limited to 'zsh/.zshrc')
-rw-r--r--zsh/.zshrc32
1 files changed, 15 insertions, 17 deletions
diff --git a/zsh/.zshrc b/zsh/.zshrc
index 14926af..0214765 100644
--- a/zsh/.zshrc
+++ b/zsh/.zshrc
@@ -175,27 +175,25 @@ export MANPATH=$MANPATH:$HOME/.local/share/man
export GOPATH=$HOME/.local
-# local_bin
-if [[ -d ~/local_bin ]]; then
- export PATH=~/local_bin:$PATH
-elif [[ -d ~/.sync/local_bin ]]; then
- export PATH=~/.sync/local_bin:$PATH
-fi
-
-# nlp_scripts
-if [[ -d ~/nlp_scripts ]]; then
- export PATH=~/nlp_scripts:$PATH
-elif [[ -d ~/.sync/nlp_scripts ]]; then
- export PATH=~/.sync/nlp_scripts:$PATH
-fi
+function maybe_add_dir_to_path {
+ if [[ -d $1 ]]; then
+ export PATH=$1:$PATH;
+ fi
+}
-if [[ -d /usr/lib/colorgcc/bin ]]; then
- PATH=/usr/lib/colorgcc/bin:$PATH
-fi
+maybe_add_dir_to_path ~/local_bin:$PATH
+maybe_add_dir_to_path /home/pks/local_bin:$PATH
+maybe_add_dir_to_path ~/.sync/local_bin:$PATH
+maybe_add_dir_to_path /home/pks/.sync/local_bin:$PATH
+maybe_add_dir_to_path ~/nlp_scripts
+maybe_add_dir_to_path /home/pks/nlp_scripts
+maybe_add_dir_to_path ~/.sync/nlp_scripts
+maybe_add_dir_to_path /home/pks/.sync/nlp_scripts
+maybe_add_dir_to_path /usr/lib/colorgcc/bin
which R &>/dev/null
if [[ $? == 0 ]]; then
- export R_LIBS_USER=$HOME/.R
+ maybe_add_dir_to_path $HOME/.R
fi
if [[ -x $(which nvim &>/dev/null) ]]; then