Skip to content

Instantly share code, notes, and snippets.

View proglottis's full-sized avatar

James Fargher proglottis

  • Wellington, New Zealand
View GitHub Profile
@kuahyeow
kuahyeow / git-beetil.sh
Created December 3, 2012 20:39 — forked from ezza/.bashrc
Returns the title of the beetil your branch is on
export beetil_api_key=YOUR_BEETIL_API_KEY_HERE
# extracts the branch name
function plain_git_branch {
git symbolic-ref HEAD 2> /dev/null | sed -e 's/refs\/heads\///'
}
# extracts the part of the branch name that could be a beetil number
function beetil_number_from_git_branch {
plain_git_branch 2> /dev/null | cut -c2-9