Better HN
topnewbestaskshowjobs
Log inSign up

gose

2 karma · joined May 16, 2011 (15y ago) · 3 submissions

Submissions

comment 14y ago · link · parent

Same here. Here's the script for a git-aware bash prompt if anyone else is interested.

function parse_git_dirty {

  [[ $(git status 2> /dev/null | tail -n1) != "nothing to commit (working directory clean)" ]] && echo "*"
}

function parse_git_branch {

  git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/ \1$(parse_git_dirty)/"
}

PS1='[\w$(parse_git_branch)] '

comment 15y ago · link · parent

Here's Mac OS X's:

http://www.opensource.apple.com/source/shell_cmds/shell_cmds...

It's close to the FreeBSD implementation.

comment 15y ago · link · parent

Reminds me of this quote from Simon Sinek:

"People don't buy what you do, they buy why you do it."

He uses Apple quite a bit in his analogy here:

http://www.ted.com/talks/simon_sinek_how_great_leaders_inspi...