Skip to content

Instantly share code, notes, and snippets.

@troyericg
Last active December 14, 2015 03:59
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save troyericg/5024880 to your computer and use it in GitHub Desktop.
Save troyericg/5024880 to your computer and use it in GitHub Desktop.
a few modifications to my shell.
# ------------------------------------------------
# Opens up various text editors in background
alias subl='open -a "Sublime Text 2" -g'
alias mate='open -a "TextMate" -g'
# ------------------------------------------------
# Server Aliases
#python server
alias pyserve='python -m SimpleHTTPServer'
#local:3000
alias local3='open http://localhost:3000 -g'
#local:8000
alias local8='open http://localhost:8000 -g'
# ------------------------------------------------
# Sets up colors for directory listings
export CLICOLOR=1;
export LSCOLORS=ExFxCxDxBxegedabagacad;
# ------------------------------------------------
# Shows which Git branch you're working on
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ \[\1\]/'
}
function proml {
# OPTIONAL COLORS:
local BLUE="\[\033[0;34m\]"
local RED="\[\033[0;31m\]"
local LIGHT_RED="\[\033[1;31m\]"
local GREEN="\[\033[0;32m\]"
local LIGHT_GREEN="\[\033[1;32m\]"
local WHITE="\[\033[1;37m\]"
local LIGHT_GRAY="\[\033[0;37m\]"
# END OPTIONAL
local DEFAULT="\[\033[0m\]"
PS1="\h:\W$LIGHT_GRAY\$(parse_git_branch)$DEFAULT ⚡ "
}
proml
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment