mpneuried
3/24/2015 - 7:31 AM

.profile

.profile

# If not running interactively, don't do anything
[ -z "$PS1" ] && return

function list-ps(){
	ps -A | grep $1 | awk '{ if ($4 != "grep"){a = ( $1 " " a ) }}END{print a}'
}

function kill-ps(){
	ps -A | grep $1 | awk '{ if ($4 != "grep"){a = ( $1 " " a ) }}END{print a}' | xargs kill -9
}

function www(){
	python -m SimpleHTTPServer
}

function editprofile(){
	sudo nano ~/.profile
}
function edit-profile(){
	sudo nano ~/.profile
}

function parse_git_branch {
	git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/@\1 /'
}

#Aliases that do things
alias ip='ipconfig getifaddr en0'
alias ipext='curl -s http://checkip.dyndns.org/ | grep -o '[0-9][0-9]*.[0-9][0-9]*.[0-9][0-9]*.[0-9]*''
alias ll='ls -AlhG'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias h='history'
alias vi='/usr/bin/vim'
alias texted='open /Applications/TextEdit.app'
alias rot13="tr '[A-Za-z]' '[N-ZA-Mn-za-m]'"
alias psgrep='ps aux |grep -v grep |grep -i'
alias nd='node-dev'

#Aliases that go places
# redacted--just a bunch of ssh aliases to local boxes

# CLI colors
export CLICOLOR=true
export LSCOLORS='exfxcxdxbxegedabagacad'

function prompt {
	local YELLOW="\[\033[0;33m\]"
	local BLUEBOLD="\[\033[1;34m\]"
	local DEFAULT="\[\033[00m\]"
	export PS1="$BLUEBOLD\w $YELLOW\$(parse_git_branch)$DEFAULT"
}
prompt