mirror of
https://github.com/jimeh/dotfiles.git
synced 2026-02-19 13:26:40 +00:00
Various env var fixes, tweaks, and shell boot speed up
This commit is contained in:
0
shell/_main.sh
Normal file → Executable file
0
shell/_main.sh
Normal file → Executable file
@@ -29,10 +29,6 @@ path_prepend "$HOME/bin"
|
||||
# Add dotfiles' bin directory to PATH
|
||||
path_prepend "$DOTBIN"
|
||||
|
||||
# Relative Paths - must be first in PATH
|
||||
path_append "./node_modules/.bin" # Node.js
|
||||
path_append "./vendor/bundle/bin" # Ruby Bundler
|
||||
|
||||
# Ensure TMPDIR is the same for local and remote ssh logins
|
||||
if [[ $TMPDIR == "/var/folders/"* ]] || [[ $TMPDIR == "" ]]; then
|
||||
export TMPDIR="/tmp/user-$USER"
|
||||
|
||||
26
shell/golang.sh
Normal file → Executable file
26
shell/golang.sh
Normal file → Executable file
@@ -2,5 +2,27 @@
|
||||
# Go (golang) environment setup.
|
||||
#
|
||||
|
||||
export GOPATH="$HOME/.go"
|
||||
path_append "$GOPATH/bin"
|
||||
export GOPATH="$HOME/.go:$HOME/Projects/Go"
|
||||
path_prepend "$HOME/Projects/Go/bin:$HOME/.go/bin"
|
||||
|
||||
install_go_global_packages () {
|
||||
local packages=(
|
||||
github.com/golang/lint/golint \
|
||||
github.com/kisielk/errcheck \
|
||||
github.com/kr/pretty \
|
||||
github.com/laher/goxc \
|
||||
github.com/mdempsky/unconvert \
|
||||
github.com/motemen/gore \
|
||||
github.com/nsf/gocode \
|
||||
github.com/pmezard/go-difflib/difflib \
|
||||
github.com/rogpeppe/godef \
|
||||
github.com/tools/godep \
|
||||
golang.org/x/tools/cmd/goimports \
|
||||
launchpad.net/gorun \
|
||||
)
|
||||
|
||||
for package in "${packages[@]}"; do
|
||||
echo "installing/updating \"$package\""
|
||||
go get -u "$package"
|
||||
done
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ if [ -f "$HOME/.nvm/nvm.sh" ]; then
|
||||
source "$HOME/.nvm/nvm.sh"
|
||||
|
||||
# And it's shell completion
|
||||
if [ -f "$HOME/.nvm/bash_completion" ]; then
|
||||
if [ -n "$BASH_VERSION" ] && [ -f "$HOME/.nvm/bash_completion" ]; then
|
||||
source "$HOME/.nvm/bash_completion"
|
||||
fi
|
||||
fi
|
||||
|
||||
19
shell/ruby.sh
Normal file → Executable file
19
shell/ruby.sh
Normal file → Executable file
@@ -1,3 +1,7 @@
|
||||
#
|
||||
# Ruby environment setup.
|
||||
#
|
||||
|
||||
# Aliases
|
||||
alias po="powify"
|
||||
alias lu="lunchy"
|
||||
@@ -33,16 +37,19 @@ fi
|
||||
# Load rbenv or RVM depending on which is available
|
||||
if [ -d "$HOME/.rbenv/bin" ]; then
|
||||
path_prepend "$HOME/.rbenv/bin"
|
||||
path_prepend "$HOME/.rbenv/shims"
|
||||
# if [[ ":$PATH:" != *":$HOME/.rbenv/shims:"* ]]; then
|
||||
eval "$(rbenv init -)"
|
||||
# fi
|
||||
elif [ -s "$HOME/.rvm/scripts/rvm" ]; then
|
||||
source "$HOME/.rvm/scripts/rvm"
|
||||
fi
|
||||
|
||||
# lunchy auto-completion
|
||||
LUNCHY_DIR="$(dirname `gem which lunchy`)/../extras"
|
||||
if [ -n "$BASH_VERSION" ] && [ -f "$LUNCHY_DIR/lunchy-completion.bash" ]; then
|
||||
source "$LUNCHY_DIR/lunchy-completion.bash"
|
||||
elif [ -n "$ZSH_VERSION" ] && [ -f "$LUNCHY_DIR/lunchy-completion.zsh" ]; then
|
||||
source "$LUNCHY_DIR/lunchy-completion.zsh"
|
||||
if [ -n "$BASH_VERSION" ]; then
|
||||
if which gem &> /dev/null && gem which lunchy &> /dev/null; then
|
||||
LUNCHY_DIR="$(dirname "$(gem which lunchy)")/../extras"
|
||||
if [ -f "$LUNCHY_DIR/lunchy-completion.bash" ]; then
|
||||
source "$LUNCHY_DIR/lunchy-completion.bash"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user