Skip to content

Instantly share code, notes, and snippets.

@nienkedekker
Last active August 5, 2016 07:57
Show Gist options
  • Save nienkedekker/f18fc4401bf875c7ff8a2d6757a7cebf to your computer and use it in GitHub Desktop.
Save nienkedekker/f18fc4401bf875c7ff8a2d6757a7cebf to your computer and use it in GitHub Desktop.
Bash_profile
# -----------------------------
# TERMINAL PROMPT
# -----------------------------
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h 🗂 \[\033[33;1m\]\w\[\033[m\] ⚡ \$(__git_ps1) \$ "
export CLICOLOR=1
export LSCOLORS=ExFxBxDxCxegedabagacad
# -----------------------------
# ALIASING
# -----------------------------
# Alias ls to ls -lisah
alias ls='ls -lisah'
# Alias afk to lock mode
alias afk="/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend"
# Alias Code to code folder
alias Code="cd ~/Desktop/Code"
# Alias DP to Desktop
alias dp="cd ~/Desktop"
# Alias ~ to homedir
alias ~="cd ~"
# Alias sauce to source bash_profile
alias sauce="source ~/.bash_profile"
# Update all the things
alias update='sudo softwareupdate -i -a; brew update; brew upgrade --all; brew cleanup; npm install npm -g; npm update -g; sudo gem update --system; sudo gem update'
# Open current directory in Finder
alias f='open -a Finder ./'
# Enable aliases to be sudo’ed
alias sudo='sudo '
## -----------------------------
## OSX Thingies
## -----------------------------
# Git completion
source ~/git-completion.bash
# Load in the git branch prompt script.
source ~/.git-prompt.sh
# Show folder paths in Finder window (will kill all open Finder windows)
alias finderShowPath="defaults write com.apple.finder _FXShowPosixPathInTitle -bool true; killall Finder"
# Hide folder paths in Finder window (will kill all open Finder windows)
alias finderHidePath="defaults write com.apple.finder _FXShowPosixPathInTitle -bool false; killall Finder"
# -----------------------------
# PATHS
# -----------------------------
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment