Created
July 26, 2013 14:24
-
-
Save chrisdroukas/6089254 to your computer and use it in GitHub Desktop.
Want to see what a designer's shit bash profile looks like? Look no further.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Git completion | |
| # https://github.com/git/git/tree/master/contrib/completion | |
| source ~/.git-completion.sh | |
| source ~/.git-prompt.sh | |
| # Aliases and functions | |
| alias ls='ls -1' | |
| cd() { | |
| builtin cd "$@" && ls; | |
| } | |
| function gh() { | |
| giturl=$(git config --get remote.origin.url) | |
| if [ "$giturl" == "" ] | |
| then | |
| echo "Not a git repository or no remote.origin.url set" | |
| return; | |
| fi | |
| giturl=${giturl/git\@github\.com\:/https://github.com/} | |
| giturl=${giturl/\.git/\/tree/} | |
| branch="$(git symbolic-ref HEAD 2>/dev/null)" || | |
| branch="(unnamed branch)" # detached HEAD | |
| branch=${branch##refs/heads/} | |
| giturl=$giturl$branch | |
| open $giturl | |
| } | |
| # Make it look sexy | |
| PS1='\[$(tput bold)\]\u \W$(__git_ps1 " (%s)") \[$(tput setaf 4)\]▹ \[$(tput sgr0)\]' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment