Move (rb|py)env and go init to zprofile

This commit is contained in:
Henrik Lissner 2014-09-08 12:11:38 -04:00
parent 2e053c7107
commit 5293d3ebe6
3 changed files with 20 additions and 15 deletions

View file

@ -1,5 +1,7 @@
# Executes commands at login pre-zshrc.
autoload -Uz command_exists
# Browser
[[ "$OSTYPE" == darwin* ]] && export BROWSER='open'
@ -20,6 +22,7 @@ typeset -gU cdpath fpath mailpath path
# Set the list of directories that Zsh searches for programs.
path=(
$HOME/.{py,rb}env/shims
$HOME/.{py,rb}env/bin
$HOME/.dotfiles/bin
/usr/local/{bin,sbin}
@ -50,6 +53,19 @@ if [[ ! -d "$TMPDIR" ]]; then
fi
TMPPREFIX="${TMPDIR%/}/zsh"
if [[ ! -d "$TMPPREFIX" ]]; then
mkdir -p "$TMPPREFIX"
[[ ! -d "$TMPPREFIX" ]] && mkdir -p "$TMPPREFIX"
# Init extra niceties
command_exists "rbenv" && eval "$(rbenv init - --no-rehash)"
if command_exists "pyenv"; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
if command_exists "go"; then
export GOPATH="$HOME/Dropbox/Projects/dev/go"
export PATH="$GOPATH/bin:$PATH"
fi
if [ -n "$EMACS" ]; then
source ~/.zsh/aliases
fi

View file

@ -4,8 +4,6 @@
# Don't wait for keys (snappier vi-mode)
# export KEYTIMEOUT=1
autoload -Uz command_exists
zle -N edit-command-line
bindkey -v
bindkey '^f' edit-command-line

9
zshrc
View file

@ -10,12 +10,3 @@ source ~/.zsh/aliases
# Init extra niceties
command_exists "fasd" && eval "$(fasd --init auto)"
command_exists "rbenv" && eval "$(rbenv init - --no-rehash)"
if command_exists "pyenv"; then
eval "$(pyenv init -)"
eval "$(pyenv virtualenv-init -)"
fi
if command_exists "go"; then
export GOPATH="$HOME/Dropbox/Projects/dev/go"
export PATH="$GOPATH/bin:$PATH"
fi