forked from mdo/config
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Get the Git branch | ||
parse_git_branch() { | ||
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | ||
} | ||
|
||
# Custom bash prompt | ||
# | ||
# Includes custom character for the prompt, path, and Git branch name. | ||
# | ||
# Source: kirsle.net/wizards/ps1.html | ||
export PS1="\n\[$(tput bold)\]\[$(tput setaf 5)\]➜ \[$(tput setaf 6)\]\w\[$(tput setaf 3)\]\$(parse_git_branch) \[$(tput sgr0)\]" | ||
|
||
export PATH=/opt/local/bin:/opt/local/sbin:${PATH} | ||
|
||
# Aliases | ||
|
||
## Tools | ||
alias subl='/Applications/Sublime\ Text\ 2.app/Contents/SharedSupport/bin/subl' | ||
|
||
## Shortcuts | ||
alias ll='ls -al' | ||
alias editgit='atom ~/.gitconfig' | ||
alias editbash='subl ~/.bash_profile' | ||
alias resource='source ~/.bash_profile && echo "Done!"' | ||
alias vi=vim | ||
|
||
## Git commands | ||
alias log='git log' | ||
alias diff='git diff' | ||
alias branch='git branch' | ||
alias st='git status' | ||
alias fetch='git fetch' | ||
alias push='git push origin head' | ||
alias pull='git pull' | ||
alias fp='fetch && pull' | ||
alias gmm='git merge master' | ||
alias gmghp='git merge gh-pages' | ||
alias recent='git for-each-ref --sort=-committerdate refs/heads/' | ||
alias branch_new="git for-each-ref --sort=-committerdate refs/heads/ --format='%(refname:short)'" | ||
|
||
## Git branch switching | ||
alias master='git co master' | ||
alias ghp='git co gh-pages' | ||
|
||
## Build tools | ||
alias gd='grunt dist' | ||
|
||
## SVN | ||
alias up='svn up' | ||
alias sst='svn st' | ||
|
||
## Switch repos | ||
DIR=~/work | ||
alias h='cd ~/' | ||
alias w='cd ${DIR}' | ||
alias bs='cd ${DIR}/bootstrap' | ||
|
||
## Core GitHub apps | ||
alias gh='cd ~/github' | ||
alias gg='cd ~/github/github' | ||
alias ggg='gg && script/server' | ||
alias giants='cd ~/github/giants' | ||
alias hire='cd ~/github/hire' | ||
alias summit='cd ~/github/summit' | ||
alias primer='cd ~/github/primer' | ||
|
||
## Server guick starts | ||
alias ss='script/server' | ||
alias js='jekyll serve --watch' | ||
alias ps='python -m SimpleHTTPServer 4000' | ||
alias gtest='testrb test/integration/bundle_test.rb' | ||
|
||
## Mobile iOS testing | ||
alias ios='open /Applications/Xcode.app/Contents/Applications/iPhone\ Simulator.app' | ||
|
||
# Added by the Heroku Toolbelt | ||
export PATH="/usr/local/heroku/bin:$PATH" |