Last active
August 29, 2015 14:24
-
-
Save RJNY/74890c4992919627f235 to your computer and use it in GitHub Desktop.
OSX_Bash_template
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
# Awesome website for shell scripts: http://explainshell.com/ | |
export PATH=/usr/local/bin:$PATH | |
### Look at http://alias.sh/ for more fun things like this | |
# For ruby development | |
which -s bundle && alias be="bundle exec" | |
# Some tests with git common commands | |
alias be='bundle exec' | |
# Some tests with database commands in development | |
alias boom='be rake db:drop; be rake db:create && be rake db:migrate' | |
alias seed='be rake db:drop; be rake db:seed' | |
alias booms='boom && seed' | |
# Shows name (in cyan), current working directory (in green), current branch (in pink) | |
PS1='\[\e[1;96m\]\u: \[\e[0;32m\]\W \[\033[00m\]$(git branch &>/dev/null; if [ $? -eq 0 ]; then echo "\[\e[0;35m\][$(git branch | grep ^*|sed s/\*\ //)] \[\033[00m\]"; fi)$ ' | |
# grab git branch & branch autocomplete | |
# link to blog post helping with this: http://buddylindsey.com/adding-git-autocomplete-to-bash-on-os-x/ | |
# if curl command doesn't work, just go to url given and manually create and save file | |
if [ -f ~/git-completion.bash ]; then | |
. ~/git-completion.bash | |
fi | |
# Allows use with aliases(?) ...still doesn't work when not preceded by the word 'git' | |
# Guide: https://github.com/bobthecow/git-flow-completion/wiki/Install-Bash-git-completion | |
if [ -f `brew --prefix`/etc/bash_completion ]; then | |
. `brew --prefix`/etc/bash_completion | |
fi | |
# Some aliases for great purpose! | |
alias pyserver="python -m SimpleHTTPServer" | |
alias desk='cd ~/Desktop' | |
alias ls='ls -FGh' | |
alias reload='source ~/.bash_profile' | |
alias f='open -a Finder ./' # Opens current directory in MacOS Finder | |
# Case insensitive tabbing | |
bind "set completion-ignore-case on" | |
bind "set show-all-if-ambiguous on" | |
export LSCOLORS=GxFxCxDxBxegedabagaced | |
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment