Skip to content

Instantly share code, notes, and snippets.

@nabucosound
Last active September 30, 2015 16:37
Show Gist options
  • Save nabucosound/1827565 to your computer and use it in GitHub Desktop.
Save nabucosound/1827565 to your computer and use it in GitHub Desktop.
Bash profile configuration for Homebrew and Python stuff
# Custom propmt
export PS1="\u:\w$ "
# ls with colors
export CLICOLOR=1
export LSCOLORS=gxgxcxdxbxegedabagacad
# Homebrew binaries and scripts before system ones
export PATH=/usr/local/bin:/usr/local/sbin:/usr/local/opt/ruby/bin:$PATH
# pip bash completion start
_pip_completion()
{
COMPREPLY=( $( COMP_WORDS="${COMP_WORDS[*]}" \
COMP_CWORD=$COMP_CWORD \
PIP_AUTO_COMPLETE=1 $1 ) )
}
complete -o default -F _pip_completion pip
# pip bash completion end
# Virtualenvwrapper
export WORKON_HOME=$HOME/virtualenvs
source /usr/local/bin/virtualenvwrapper.sh
# While on a virtualenv, get site-packages path
alias vwd='python -c "import distutils; print(distutils.sysconfig.get_python_lib())"'
# Use Vim binary from Homebrew MacVim to get +python compiled
# vim='/usr/local/Cellar/macvim/7.3-66/MacVim.app/Contents/MacOS/Vim -n'
# alias vim="${vim}"
# Comments on Django, UTF-8 error and OS X Terminals:
# Set locale to avoid the error
# More info: https://code.djangoproject.com/ticket/5846
export LC_CTYPE=es_ES.UTF-8
# Grep aliases to get colors and most common filetype searches
alias grep='grep --color'
alias pygrep='grep --color -rin --include=*.py'
alias htmlgrep='grep --color -rin --include=*.html'
### Added by the Heroku Toolbelt
# export PATH="/usr/local/heroku/bin:$PATH"
# Ack for django projects
alias ack='ack --ignore-dir=migrations --ignore-dir=fixtures --ignore-dir=LC_MESSAGES'
# Do not store certain cmds in .bash_history
export HISTIGNORE="md5 *:ls:ls -l:ls -la:ls -lrt"
# Amazon AWS command line interface
complete -C aws_completer aws
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment