Created
September 15, 2013 00:41
-
-
Save kmazanec/6567061 to your computer and use it in GitHub Desktop.
My current .bash_profile. The "today" function will make getting to the right folder much easier. Simply type "today" on the command line.
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
function parse_git_branch () { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
function today () { | |
today=$(date +"%m%d") | |
# Modify the line below to your local dropbox path from ~ | |
# Ex: /Users/Keith/Dropbox/Fireflies/Keith | |
# The location of Drobox on my personal machine | |
dbxpath="Dropbox/Fireflies/Keith" | |
cd ~ | |
if [ $today = "0915" ]; then cd $dbxpath/phase2/week1/day1 | |
elif [ $today = "0916" ]; then cd $dbxpath/phase2/week1/day1 | |
elif [ $today = "0917" ]; then cd $dbxpath/phase2/week1/day2 | |
elif [ $today = "0918" ]; then cd $dbxpath/phase2/week1/day3 | |
elif [ $today = "0919" ]; then cd $dbxpath/phase2/week1/day4 | |
elif [ $today = "0920" ]; then cd $dbxpath/phase2/week1/day5 | |
elif [ $today = "0923" ]; then cd $dbxpath/phase2/week2/day1 | |
elif [ $today = "0924" ]; then cd $dbxpath/phase2/week2/day2 | |
elif [ $today = "0925" ]; then cd $dbxpath/phase2/week2/day3 | |
elif [ $today = "0926" ]; then cd $dbxpath/phase2/week2/day4 | |
elif [ $today = "0927" ]; then cd $dbxpath/phase2/week2/day5 | |
elif [ $today = "0930" ]; then cd $dbxpath/phase2/week3/day1 | |
elif [ $today = "1001" ]; then cd $dbxpath/phase2/week3/day2 | |
elif [ $today = "1002" ]; then cd $dbxpath/phase2/week3/day3 | |
elif [ $today = "1003" ]; then cd $dbxpath/phase2/week3/day4 | |
elif [ $today = "1004" ]; then cd $dbxpath/phase2/week3/day5 | |
elif [ $today = "1007" ]; then cd $dbxpath/phase3/week1/day1 | |
elif [ $today = "1008" ]; then cd $dbxpath/phase3/week1/day2 | |
elif [ $today = "1009" ]; then cd $dbxpath/phase3/week1/day3 | |
elif [ $today = "1010" ]; then cd $dbxpath/phase3/week1/day4 | |
elif [ $today = "1011" ]; then cd $dbxpath/phase3/week1/day5 | |
elif [ $today = "1014" ]; then cd $dbxpath/phase3/week2/day1 | |
elif [ $today = "1015" ]; then cd $dbxpath/phase3/week2/day2 | |
elif [ $today = "1016" ]; then cd $dbxpath/phase3/week2/day3 | |
elif [ $today = "1017" ]; then cd $dbxpath/phase3/week2/day4 | |
elif [ $today = "1018" ]; then cd $dbxpath/phase3/week2/day5 | |
else | |
echo "Looks like it's the weekend" | |
cd $dbxpath | |
fi | |
# | |
pwd | |
ls | |
} | |
alias gs='git status ' | |
alias ga='git add ' | |
alias gb='git branch ' | |
alias gc='git commit' | |
alias gd='git diff' | |
alias go='git checkout ' | |
alias gk='gitk --all&' | |
alias gx='gitx --all' | |
alias ls='ls -FGh' | |
alias dbx='cd ~/Dropbox/Fireflies/Keith/;ls' | |
BLUE="\[\033[0;34m\]" | |
DARK_BLUE="\[\033[1;34m\]" | |
RED="\[\033[0;31m\]" | |
DARK_RED="\[\033[1;31m\]" | |
YELLOW="\[\033[0;33m\]" | |
GREEN="\[\033[0;32m\]" | |
DARK_GREEN="\[\033[1;32m\]" | |
GRAY="\[\033[1;30m\]" | |
LIGHT_GRAY="\[\033[0;37m\]" | |
CYAN="\[\033[0;36m\]" | |
LIGHT_CYAN="\[\033[1;36m\]" | |
NO_COLOUR="\[\033[0m\]" | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session. | |
[[ -r "$HOME/.rvm/scripts/completion" ]] && . "$HOME/.rvm/scripts/completion" # This adds rvm shell completion | |
PS1="$GREEN\u$NO_COLOUR: $RED\$(~/.rvm/bin/rvm-prompt i v g)$NO_COLOUR: /\W$CYAN\$(parse_git_branch)$NO_COLOUR \$ " | |
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function* | |
export PATH=/usr/local/bin:$PATH:$HOME/.rvm/bin | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment