Source

dotfiles / .bash_profile

Full commit
# base-files version 3.7-1

# To pick up the latest recommended .bashrc content,
# look in /etc/defaults/etc/skel/.bashrc

# Modifying /etc/skel/.bashrc directly will prevent
# setup from updating it.

# The copy in your home directory (~/.bashrc) is yours, please
# feel free to customise it to create a shell
# environment to your liking.  If you feel a change
# would be benificial to all, please feel free to send
# a patch to the cygwin mailing list.

# User dependent .bashrc file


# Shell Options
# #############

# See man bash for more options...

# Don't wait for job termination notification
# set -o notify

# Don't use ^D to exit
set -o ignoreeof

# Use case-insensitive filename globbing
shopt -s nocaseglob

# Make bash append rather than overwrite the history on disk
shopt -s histappend

# When changing directory small typos can be ignored by bash
# for example, cd /vr/lgo/apaache would find /var/log/apache
shopt -s cdspell


# Completion options
# ##################

# These completion tuning parameters change the default behavior of bash_completion:

# Define to access remotely checked-out files over passwordless ssh for CVS
# COMP_CVS_REMOTE=1

# Define to avoid stripping description in --option=description of './configure --help'
# COMP_CONFIGURE_HINTS=1

# Define to avoid flattening internal contents of tar files
# COMP_TAR_INTERNAL_PATHS=1

# If this shell is interactive, turn on programmable completion enhancements.
# Any completions you add in ~/.bash_completion are sourced last.
# case $- in
#   *i*) [[ -f /etc/bash_completion ]] && . /etc/bash_completion ;;
# esac


# History Options
# ###############

# Don't put duplicate lines in the history.
# export HISTCONTROL="ignoredups"

# Ignore some controlling instructions
# export HISTIGNORE="[   ]*:&:bg:fg:exit"

# Whenever displaying the prompt, write the previous line to disk
# export PROMPT_COMMAND="history -a"


# Aliases
# #######

# Some example alias instructions
# If these are enabled they will be used instead of any instructions
# they may mask.  For example, alias rm='rm -i' will mask the rm
# application.  To override the alias instruction use a \ before, ie
# \rm will call the real rm not the alias.

# Interactive operation...
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Default to human readable figures
alias df='df -h'
alias du='du -h'

# Misc :)
alias less='less -r'                          # raw control characters
alias whence='type -a'                        # where, of a sort
alias grep='grep --color'                     # show differences in colour

# Some shortcuts for different directory listings
#alias ls='ls -hF --color=tty'                 # classify files in colour
#alias dir='ls --color=auto --format=vertical'
#alias vdir='ls --color=auto --format=long'
alias ls='ls -G'
alias ll='ls -lh'                              # long list
alias la='ls -A'                              # all but . and ..
alias l='ls -CF'                              #

#alias G='| grep -i'
#alias M='| more'

# Functions
# #########

# Some example functions
function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; }

set -o emacs

export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8



PATH="/Users/sevas/bin/:$PATH"

BLACK="\[\033[0;30m\]"
RED="\[\033[0;31m\]"
GREEN="\[\033[0;32m\]"
BROWN="\[\033[0;33m\]"
BLUE="\[\033[0;34m\]"
PURPLE="\[\033[0;35m\]"
CYAN="\[\033[0;36m\]"
LIGHT_GRAY="\[\033[0;37m\]"

DARK_GRAY="\[\033[1;30m\]"
LIGHT_RED="\[\033[1;31m\]"
LIGHT_GREEN="\[\033[1;32m\]"
YELLOW="\[\033[1;33m\]"
LIGHT_BLUE="\[\033[1;34m\]"
LIGHT_PURPLE="\[\033[1;35m\]"
LIGHT_CYAN="\[\033[1;36m\]"
WHITE="\[\033[1;37m\]"

DEFAULT="\[\033[0m\]"




## GO
export GOBIN=/Users/sevas/bin
export GOOS=darwin
export GOARCH=amd64
export GOROOT=/Users/sevas/build/go
export PATH=$GOBIN:$PATH


#processing
export PROCESSING_HOME=/Applications/Processing.app/Contents/Resources/


#D=$'\e[37;40m'
#GRAY=$'\e[\033[0m'
#PINK=$'\e[35;40m'
#GREEN=$'\e[32;40m'
#ORANGE=$'\e[33;40m'

#hg_ps1() {
#    hg prompt "{${D} on ${PINK}{branch}}{${D} at ${ORANGE}{bookmark}}{${GREEN}{status}}" 2> /#dev/null
#}

export PS1="\n$PURPLE\u$DEFAULT at $BROWN\h$DEFAULT in $GREEN\w\
$DEFAULT\n$ "

#export PS1='\u at \h (\w) $ '


#clojure
#export CLOJURE_EXT=~/.clojure
#export PATH="~/opt/clojure-contrib/launchers/bash:$PATH:"
#alias clj-1.1=clj-env-dir



MKL_NUM_THREADS=1
export MKL_NUM_THREADS


# autojump
if [ -f ~/.bashrc ]; then
  . ~/.bashrc
fi


# load python-related functions
if [ -f ~/.bash_pyfuncs ]; then
  source ~/.bash_pyfuncs
fi

# git completion
#source /usr/local/git/contrib/completion/git-completion.bash

# mercurial completion
#source ~/.hg17_bash_completion.sh 




export PATH="/usr/local/ITK-3.20-i386/bin:${PATH}"
export DYLD_LIBRARY_PATH="/usr/local/ITK-3.20-i386/lib/InsightToolkit"


# Setting PATH for Python 2.7
# The orginal version is saved in .bash_profile.pysave
#PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"
#export PATH


# haskell
PATH="${HOME}/.cabal/bin:${PATH}"
export PATH

##
# Your previous /Users/sevas/.bash_profile file was backed up as /Users/sevas/.bash_profile.macports-saved_2011-01-18_at_21:27:17
##





select_system_python_27



#export ARCHFLAGS="-arch i386 –arch x86_64"

export PATH="$PATH:/usr/local/sbin/"

#. `brew --prefix`/etc/profile.d/z.sh
 

function server() {
	local port="${1:-8000}"
	open "http://localhost:${port}/"
	python -m SimpleHTTPServer "$port"
}


alias lt='tree --dirsfirst -ChFL 1'
alias lt2='tree --dirsfirst -ChFL 2'
alias lt3='tree --dirsfirst -ChFL 3' 
alias lt4='tree --dirsfirst -ChFL 4'