Last active
October 24, 2019 19:06
-
-
Save RobRuana/bd751e6c4bfedad94d9c to your computer and use it in GitHub Desktop.
Environment variable exports
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#-------------------------------------------------------- | |
# Environment variable exports | |
#-------------------------------------------------------- | |
export PAGER=less | |
export EDITOR=vim | |
export VISUAL=vim | |
if [[ $PATH != *"$HOME/bin:/usr/local/bin"* ]]; then | |
export PATH=$HOME/bin:/usr/local/bin:$PATH | |
fi | |
export TIMEFORMAT=$'\nreal %3R\tuser %3U\tsys %3S\tpcpu %P\n' | |
export HOSTFILE=$HOME/.hosts | |
export INPUTRC=$HOME/.inputrc | |
export PYTHONSTARTUP=$HOME/.pythonstartup | |
export GOROOT=/usr/local/opt/go/libexec | |
#-------------------------------------------------------- | |
# Bash history | |
#-------------------------------------------------------- | |
# Ignore common commands | |
HISTIGNORE="&:bg:fg:ll:ls:h:history" | |
# Use one command per line | |
shopt -s cmdhist | |
# Undocumented feature which sets the size to "unlimited". | |
# http://stackoverflow.com/questions/9457233/unlimited-bash-history | |
HISTFILESIZE= | |
HISTSIZE= | |
HISTTIMEFORMAT="[%F %T] " | |
# Change the file location because certain bash sessions truncate .bash_history file upon close. | |
# http://superuser.com/questions/575479/bash-history-truncated-to-500-lines-on-each-login | |
HISTFILE=~/.bash_history_eternal | |
# Force prompt to save history across sessions while ignoring duplicate commands | |
# http://unix.stackexchange.com/questions/18212/bash-history-ignoredups-and-erasedups-setting-conflict-with-common-history | |
HISTCONTROL=ignoredups:erasedups | |
shopt -s histappend | |
export PROMPT_COMMAND="history -a; history -n; history -w; history -c; history -r; $PROMPT_COMMAND" | |
#-------------------------------------------------------- | |
# pyenv setup | |
#-------------------------------------------------------- | |
if [[ $PATH != *".pyenv/shims"* ]]; then | |
if which pyenv > /dev/null; then | |
eval "$(pyenv init -)"; | |
fi | |
fi | |
#-------------------------------------------------------- | |
# poetry setup | |
#-------------------------------------------------------- | |
if [[ $PATH != *".poetry/bin"* ]]; then | |
export PATH="$HOME/.poetry/bin:$PATH" | |
fi | |
#-------------------------------------------------------- | |
# Ruby Env setup | |
#-------------------------------------------------------- | |
if [[ $PATH != *".rbenv/shims"* ]]; then | |
if which rbenv > /dev/null; then | |
eval "$(rbenv init -)"; | |
fi | |
fi | |
#-------------------------------------------------------- | |
# NVM setup | |
#-------------------------------------------------------- | |
if [[ $PATH != *".nvm/"* ]]; then | |
if [ -z "$NVM_DIR" ]; then | |
export NVM_DIR="$HOME/.nvm" | |
. "/usr/local/opt/nvm/nvm.sh" | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment