Skip to content

Instantly share code, notes, and snippets.

@allex
Created March 27, 2015 05:49
Show Gist options
  • Save allex/317f2b8bca35ee951a8f to your computer and use it in GitHub Desktop.
Save allex/317f2b8bca35ee951a8f to your computer and use it in GitHub Desktop.
# .bashrc
# Author: Allex Wang ([email protected])
# GistID: 317f2b8bca35ee951a8f
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
PATH=.:./.bin:./bin:~/.bin:$PATH
export PATH
export EDITOR=vim
svngrep()
{
p=${1}
if [ "${p}" = "?" ]; then
p="\\?"
fi
# Modified from http://ceardach.com/
if [ -z "$2" ]; then
svn st | egrep "${p}" | awk '{print $2}'
else
svn ${2} `svn st | egrep "${p}" | awk '{print $2}'`
fi
}
g() {
if [ -d ./.git ]; then
git "$@"
else
[ -d ./.g ] && git --work-tree=./ --git-dir=./.g "$@" || git "$@"
fi
}
alias svn="svnop"
# User specific aliases and functions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment