Skip to content

Instantly share code, notes, and snippets.

@lewdlime
Last active October 8, 2016 09:44
Show Gist options
  • Save lewdlime/429bedc91a76f0dd66bc to your computer and use it in GitHub Desktop.
Save lewdlime/429bedc91a76f0dd66bc to your computer and use it in GitHub Desktop.
.bash_profile & .bashrc
# bash shell login profile
# Source bashrc by default
if [ -n "$BASH_VERSION" ]; then
if [ -f "$HOME/.bashrc" ]; then
source "$HOME/.bashrc"
fi
fi
# vim:ff=unix ts=4 ss=4 fdm=marker
# bashrc profile - Lee Savide
# Settings for environment variables {{{
# Startup Settings {{{
[ -f ~/.shell_prompt.sh ] && source ~/.shell_prompt.sh
# Powerline daemon {{{
# Rather than have powerline slow down the default terminal, it would be best
# if you instead use iTerm 2 in combination with the Mac OS X Terminal. To
# have iTerm load powerline and Terminal NOT load powerline, keep the
# following commands commented out below and instead, in iTerm 2 ->
# Preferences -> Profiles -> General, put the following in the "Send text at
# start" option:
# powerline-daemon -q; export POWERLINE_BASH_CONTINUATION=1; export POWERLINE_BASH_SELECT=1; . "$HOME/.powerline/powerline/bindings/bash/powerline.sh"; clear;
# After that, in Preferences -> Profiles -> Text, change the Regular Font
# & Non-ASCII Font to any of the fonts supported by Powerline.
# (https://github.com/powerline/fonts)
#powerline-daemon -q
#export POWERLINE_BASH_CONTINUATION=1
#export POWERLINE_BASH_SELECT=1
#. "$HOME/.powerline/powerline/bindings/bash/powerline.sh"
# }}}
# If not running interactively
[ -z "$PS1" ] && return
# Colors {{{
# set a fancy prompt (non-color, unless we know we "want" color)
case "$TERM" in
xterm-color) color_prompt=yes;;
esac
# uncomment for a colored prompt, if the terminal has the capability; turned
# off by default to not distract the user: the focus in a terminal window
# should be on the output of commands, not on the prompt
force_color_prompt=yes
export LC_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
if [ -n "$force_color_prompt" ]; then
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then
# We have color support; assume it's compliant with Ecma-48
# (ISO/IEC-6429). (Lack of such support is extremely rare, and such
# a case would tend to support setf rather than setaf.)
color_prompt=yes
else
color_prompt=
fi
fi
unset color_prompt force_color_prompt
# }}}
# }}}
# Aliases {{{
# enable color support of ls and also add handy aliases
if [ -x /usr/bin/dircolors ]; then
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
alias ls='ls --color=auto'
#alias dir='dir --color=auto'
#alias vdir='vdir --color=auto'
alias grep='grep --color=auto'
alias fgrep='fgrep --color=auto'
alias egrep='egrep --color=auto'
fi
# some more aliases
alias ll='ls -alF'
alias la='ls -A'
alias l='ls -CF'
alias ag='/usr/local/bin/ag'
alias ant='/opt/apache-ant-1.9.5/bin/ant'
if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases
fi
# }}}
# Completions Files {{{
# Source brew repo for tab completion on brew installed scripts
source $(brew --repository)/Library/Contributions/brew_bash_completion.sh
# Source git completion file
source ~/.git-completion.bash
# Source tmux completion file
source ~/.config/bash_completion_tmux.sh
# }}}
# Exports {{{
export DYLD_LIBRARY_PATH="/opt/subversion/lib/:/usr/lib/:$DYLD_LIBRARY_PATH"
export ARCHFLAGS="-arch x86_64"
# Set man file path(s)
#/usr/libexec/path_helper -s
export MANPATH="/usr/share/man:/usr/local/share/man:/opt/X11/share/man:/usr/local/git/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/share/man:/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.0.sdk/usr/share/man:/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/share/man:/Applications/Xcode.app/Contents/Developer/usr/llvm-gcc-4.2/share/man:/Applications/Xcode.app/Contents/Developer/usr/share/man:/usr/local/mysql/man"
# Add rbenv to path, unless using RVM.
#export PATH="~/.rbenv/bin:$PATH"
#eval "$(rbenv init -)"
# Add RVM to PATH for scripting
# Load RVM into a shell session *as a function*
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
export MAGICK_HOME="/usr/local"
export ANT_HOME="/opt/apache-ant-1.9.5/"
export PATH="${ANT_HOME}/bin:${PATH}"
export MAVEN_HOME="/opt/apache-maven-3.3.3/"
export PATH="${MAVEN_HOME}/bin:${PATH}"
# Setting JAVAROOT for Java 1.8.0 update 51
export JAVAROOT="/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home"
# Setting JAVA_HOME for Java 1.8.0 update 51
export JAVA_HOME="/Library/Java/JavaVirtualMachines/jdk1.8.0_51.jdk/Contents/Home"
# Add Java 1.8.0 update 45 to the PATH
export PATH="${JAVAROOT}/bin:${PATH}"
# Setting PATH for Git
export PATH="/usr/local/git/bin:${PATH}"
# Setting PATH for Perl 5.20
export PATH="/usr/local/ActivePerl-5.20/bin:${PATH}"
# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
export PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
export PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
# MacPorts
export PATH="/opt/local/bin:/opt/local/sbin:$PATH"
# }}}
# }}}
# vim:ff=unix ts=4 ss=4 fdm=marker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment