document.write('<link rel="stylesheet" href="http://gist.github.com/stylesheets/gist/embed.css"/>')





document.write('<div id=\"gist-31631\" class=\"gist\">\n  \n  \n    \n            \n\n      <div class=\"gist-file\">\n        <div class=\"gist-data gist-syntax\">\n          \n          \n          \n            <div class=\"gist-highlight\"><pre><div class=\"line\" id=\"LC1\"># http://henrik.nyh.se/2008/12/git-dirty-prompt\n<\/div><div class=\"line\" id=\"LC2\"># http://www.simplisticcomplexity.com/2008/03/13/show-your-git-branch-name-in-your-prompt/\n<\/div><div class=\"line\" id=\"LC3\">#   username@Machine ~/dev/dir[master]$   # clean working directory\n<\/div><div class=\"line\" id=\"LC4\">#   username@Machine ~/dev/dir[master*]$  # dirty working directory\n<\/div><div class=\"line\" id=\"LC5\">&nbsp;<\/div><div class=\"line\" id=\"LC6\">function parse_git_dirty {\n<\/div><div class=\"line\" id=\"LC7\">&nbsp;&nbsp;[[ $(git status 2&gt; /dev/null | tail -n1) != &quot;nothing to commit (working directory clean)&quot; ]] &amp;&amp; echo &quot;*&quot;\n<\/div><div class=\"line\" id=\"LC8\">}\n<\/div><div class=\"line\" id=\"LC9\">function parse_git_branch {\n<\/div><div class=\"line\" id=\"LC10\">&nbsp;&nbsp;git branch --no-color 2&gt; /dev/null | sed -e \'/^[^*]/d\' -e &quot;s/* \\(.*\\)/[\\1$(parse_git_dirty)]/&quot;\n<\/div><div class=\"line\" id=\"LC11\">}\n<\/div><div class=\"line\" id=\"LC12\">export PS1=\'\\u@\\h \\[\\033[1;33m\\]\\w\\[\\033[0m\\]$(parse_git_branch)$ \'\n<\/div><div class=\"line\" id=\"LC13\">&nbsp;<\/div><\/pre><\/div>\n        \n        <\/div>\n\n        <div class=\"gist-meta\">\n          <a href=\"http://gist.github.com/raw/31631/d6d36b652e35bc099120334d9f0a18dea3b886e7/.bashrc\" style=\"float:right;\">view raw<\/a>\n          <a href=\"http://gist.github.com/31631#file_.bashrc\" style=\"float:right;margin-right:10px;color:#666\">.bashrc<\/a>\n          <a href=\"http://gist.github.com/31631\">This Gist<\/a> brought to you by <a href=\"http://github.com\">GitHub<\/a>.\n        <\/div>\n      <\/div>\n    \n  \n<\/div>\n')
