Skip to content

Instantly share code, notes, and snippets.

@orta
Created May 4, 2010 14:51
Show Gist options
  • Save orta/389492 to your computer and use it in GitHub Desktop.
Save orta/389492 to your computer and use it in GitHub Desktop.
#keep a good history for using ctrl + r
export HISTCONTROL=erasedups
export HISTSIZE=10000
shopt -s histappend
#colours and vars
export EDITOR='mate -w'
export LSCOLORS=ExFxCxDxBxegedabagacad
alias mysql=/usr/local/mysql/bin/mysql
alias mysqladmin=/usr/local/mysql/bin/mysqladmin
# typical svn commands
alias svnd='svn diff | mate'
alias svns='svn st'
alias svnc='svn ci'
alias svnu='svn update'
alias killsvn='sudo find . -name .svn -exec rm -rf {} \;'
# typo support
alias speil='spiel'
alias amte='mate'
alias maet='mate'
alias gti='git'
alias tig='git'
alias igt='git'
alias gits='git status'
alias gitd='git diff | mate'
alias gitco='git commit'
alias gitch='git checkout'
# incase quicksilver is being bad
alias kqs='killall Quicksilver; open /Applications/Quicksilver.app'
alias qs='open /Applications/Quicksilver.app'
# cause I like colours
alias ls='ls -G'
# shortcuts to get to used folders
alias hockey='cd ~/working/table_hockey/trunk'
alias tumblette='cd ~/spiel/cocoa/tumblor/trunk'
alias btp='open ~/spiel/html/btp2'
alias cvaitor='cd ~/spiel/html/cvaitor/'
alias wgrid2="cd ~/working/wgrids/; ls;"
# to get to the right directories quick and do stuff
work ()
{
cd ~/working
ls
}
spiel ()
{
cd ~/spiel
ls
}
wgrids ()
{
cd ~/working/wgrids/;
ls
}
cl ()
{
cd $1
ls
}
bluejay() {
cd ~/working/wgrids/Bluejay
ls
git status
}
cocoajay() {
cd ~/working/wgrids/Cocoajay
ls
git status
}
#show git / svn info in the path
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(git::\1)/'
}
parse_svn_branch() {
parse_svn_url | sed -e 's#^'"$(parse_svn_repository_root)"'##g' | awk -F / '{print "(svn::"$1 "/" $2 ")"}'
}
parse_svn_url() {
svn info 2>/dev/null | grep -e '^URL*' | sed -e 's#^URL: *\(.*\)#\1#g '
}
parse_svn_repository_root() {
svn info 2>/dev/null | grep -e '^Repository Root:*' | sed -e 's#^Repository Root: *\(.*\)#\1\/#g '
}
export PS1="\[\033[00m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\$(parse_git_branch)\$(parse_svn_branch) \[\033[00m\]$\[\033[00m\] "
#paths
export PATH="/usr/local/bin:/usr/local/sbin:/usr/local/mysql/bin:/usr/local/git/bin/:~/spiel/html/cvaitor/cake/console:$PATH:/Users/ben/spiel/git-achievements"
source ~/Documents/git-completion.bash
#git achievements!
alias git="git-achievements"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment