Skip to content

Instantly share code, notes, and snippets.

@kenzic
Created October 26, 2012 18:13
Show Gist options
  • Save kenzic/3960406 to your computer and use it in GitHub Desktop.
Save kenzic/3960406 to your computer and use it in GitHub Desktop.
export PATH="/usr/local/bin:/usr/local/sbin:$PATH"
# Extended pattern matching:
# ? Matches zero or one occurrence of the given patterns
# * Matches zero or more occurrences of the given patterns
# + Matches one or more occurrences of the given patterns
# @ Matches exactly one of the given patterns
# ! Matches anything except one of the given patterns
# example: Get a directory listing of all non PDF and PostScript files in the current directory
# ls -lad !(*.p@(df|s))
shopt -s extglob
# Minor spell correction for cd commands.
shopt -s cdspell
# History is appended to the history file on exit instead of replacing.
shopt -s histappend
# Completion is not attempted on an empty line.
shopt -s no_empty_cmd_completion
# Bash completion
if [ -f `brew --prefix`/etc/bash_completion ]; then
. `brew --prefix`/etc/bash_completion
fi
#
# PYTHON SETTINGS
#
# Add current python version to path:
export PATH="/Library/Frameworks/Python.framework/Versions/Current/bin:$PATH"
# pip automatically respects an active virtualenv
export PIP_RESPECT_VIRTUALENV=true
# pip virtualenv base (via virtualenvwrapper)
export PIP_VIRTUALENV_BASE=$WORKON_HOME
# virtualenvwrapper scripts.
source virtualenvwrapper.sh
# pip 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 completion end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment