Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on Interesting Bash Prompts.
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)]/" } function parse_current_dir { ruby -e "puts ('../'+Dir.getwd.split('/').last(2).join('/')).gsub('//', '/')" } export PS1='\[\033[31;40m\]$(parse_current_dir)\[\033[0;33m\]$(parse_git_branch)\[\e[0m\]$ '
http://grab.by/3Gg
There are no comments on this comment yet.
http://grab.by/3Gg