Skip to content

Instantly share code, notes, and snippets.

@elimc
Last active August 29, 2015 14:03
Show Gist options
  • Save elimc/d5a0f114866051de8155 to your computer and use it in GitHub Desktop.
Save elimc/d5a0f114866051de8155 to your computer and use it in GitHub Desktop.
.bash_rc
# Command line prompt.
export PS1="\n\[\033[32m\]\w\[\033[1;36m\]\$(parse_git_branch)\n\[\033[33;1m\]❯ "
# Colorize the command line.
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# Set paths to my applications.
export PATH="/usr/local/Cellar/git/:/usr/local/Cellar/ruby/:/Applications/AMPPS/php/bin:/Applications/AMPPS/mysql/bin:/usr/local/bin:/usr/local/git/bin:$HOME/Scripts/wp-completion.bash:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
# User Friendly Commands.
alias home='cd ~'
alias unlockall='chmod -R 777 *'
alias softlockall='chmod -R 744 *'
alias hardlockall='chmod -R 644 *'
alias unlock='chmod 777'
alias softlock='chmod 744'
alias hardlock='chmod 644'
alias nb='/Applications/NetBeans/NetBeans\ 8.0.app/Contents/MacOS/netbeans'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias ..='cd ..'
alias ...='cd ../..'
alias ....='cd ../../..'
alias www='cd ~/../../Applications/AMPPS/www'
alias jumpstart='cd ~/../../Applications/AMPPS/www/jump_start/wp-content/themes/jumpstart'
# Redefine a command to add options.
alias ls='ls -GFh'
alias ll='ls -lahG'
alias LESS='LESS -M'
alias gcc='gcc-4.8'
alias df='df -h'
alias du='du -h'
# Safety Features.
alias mv='mv -i'
alias cp='cp -i'
alias rm='rm -i'
alias mkdir='mkdir -p'q
# Display branch name.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
# Enter hideall into the CLI to hide all hidden files.
function hideall(){
defaults write com.apple.finder AppleShowAllFiles -bool NO
killall Finder
}
# Enter showall into the CLI to show all hidden files.
function showall(){
defaults write com.apple.finder AppleShowAllFiles -bool YES
killall Finder
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment