Skip to content

Instantly share code, notes, and snippets.

View latenightbj's full-sized avatar
🤓
Grindin

BJ latenightbj

🤓
Grindin
View GitHub Profile
@bylatt
bylatt / gist:4971506
Last active September 16, 2018 16:58
My .bash_profile setup on OS X. Modified from Mark Otto's bash style (http://markdotto.com/2013/01/13/improved-terminal-hotness/) by adding git color for status.
alias ls='ls -Glah'
alias web='open -a Safari.app'
alias mail='open -a Mail.app'
alias todo='open -a Reminders.app'
git_branch () {
if git rev-parse --git-dir >/dev/null 2>&1
then echo -e "" [$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p')]
else
echo ""
fi
@TRMW
TRMW / .bashrc
Last active December 11, 2015 01:59
Slightly modified version of Mark Otto's bash style (http://markdotto.com/2012/10/18/terminal-hotness/) to prevent the wrapping problem discussed here (http://serverfault.com/questions/83382/fix-for-bash-line-wrapping-backspace-display-bugs-on-mac-os-x). I just wrapped the whole in thing in \[ and \].
export PS1='\[\e[0:35m⌘\e[m \e[0:36m\w/\e[m \e[0:33m`git branch 2> /dev/null | grep -e ^* | sed -E s/^\\\\\*\ \(.+\)$/\(\\\\\1\)\ /`\e[m\]'