summaryrefslogtreecommitdiff
path: root/zsh
diff options
context:
space:
mode:
Diffstat (limited to 'zsh')
-rw-r--r--zsh/env9
-rw-r--r--zsh/rc7
2 files changed, 9 insertions, 7 deletions
diff --git a/zsh/env b/zsh/env
index b2bd2c9..91c4cdb 100644
--- a/zsh/env
+++ b/zsh/env
@@ -14,3 +14,12 @@ setopt REMATCH_PCRE
source_if_exists dotfiles-${UNAME}/zsh/env
source_if_exists dotfiles-${DOMAIN}/zsh/env
source_if_exists dotfiles-${HOST}/zsh/env
+
+() {
+ local dir
+ for dir in ~/{.local/bin,bin} ${GOPATH:-~/go}/bin; do
+ if [[ -d ${dir} && ${path[(I)${dir}]} -eq 0 ]]; then
+ path=(${dir} ${path})
+ fi
+ done
+}
diff --git a/zsh/rc b/zsh/rc
index 9885dc7..237c140 100644
--- a/zsh/rc
+++ b/zsh/rc
@@ -15,13 +15,6 @@ PS1="%n@%m:%~ %# "
SAVEHIST=${HISTSIZE}
WORDCHARS=${WORDCHARS/\//}
-() {
- local dir
- for dir in ~/{.local/bin,bin} ${GOPATH:-~/go}/bin; do
- [[ -d ${dir} ]] && path=(${dir} ${path})
- done
-}
-
alias bc='bc -lq'
alias cp='cp -i'
alias ddig='dig +noall +answer'