Skip to content

Instantly share code, notes, and snippets.

# Thanks to http://ezprompt.net/
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
echo "[${BRANCH}${STAT}]"
else
echo ""
#!/usr/bin/env bash
alias unrar="unrar e -r *.rar"
# Find string within files
alias fs="/usr/bin/find . -type f -print|xargs grep -n "
# Find file by name
alias ff="/usr/bin/find . -name "