My Open Bashrc

Prerequisites

  • Must be on an operating system that uses .bashrc (or zshrc).

What is a Bashrc

  • The .bashrc file is a file which executes on when you open the command console. It is typically used to set environment variables (such as PATH and LSCOLORS), to set custom aliases, and to set custom functions.

My setup:

My .bashrc file is split up into two separate files. One which contains secure data such as

  • Usernames
  • Passwords
  • Private API endpoints
  • API keys

And my common_bash.sh file which is posted below:

setopt correctall
alias untar='tar -zxvf'
alias common='vi ~/.common_bash.sh'
alias custom='vi ~/.custom_bash.sh'
alias gs='git status'
alias ga='git add .'
alias rs='rails s'
alias rc='rails c'
alias mvncp='mvn clean package'
alias mvnci='mvn clean install'
alias mvnc='mvn clean'
alias mvnp='mvn package'
alias mvni='mvn install'
alias es='elasticsearch'

alias flushdns='ipconfig /flushdns'
alias updatedb='sudo /usr/libexec/locate.updatedb'
alias home='cd ~/'
alias bye='exit'
alias ll='ls -l'
alias la='ls -a'
alias bashrc='vi ~/.zshrc'
alias vimrc='vi ~/.vimrc'
alias bs='source ~/.zshrc'
alias m2='cd ~/.m2'
alias projects='cd ~/Desktop/projects'
alias settings='vi ~/.m2/settings.xml'
LSCOLORS="gxBxhxDxfxhxhxhxhxcxcx"
export LSCOLORS
export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting
export PGDATA="/usr/local/var/postgres"

alias ls="ls -G"

function cd {
 builtin cd "$@" && ls -F
}

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s