Skip to content

Instantly share code, notes, and snippets.

@mizunototori
Created August 23, 2016 01:21
Show Gist options
  • Select an option

  • Save mizunototori/b7e2a9919295acd68e4f83819f6ea216 to your computer and use it in GitHub Desktop.

Select an option

Save mizunototori/b7e2a9919295acd68e4f83819f6ea216 to your computer and use it in GitHub Desktop.
PATH=$PATH:/usr/local/texlive/2015/bin/x86_64-darwin/
# Aliases
alias ls='ls -G'
alias sublime='open -a Sublime\ Text\ 2'
alias cd='pushd$1 > /dev/null'
alias bd='popd$1 > /dev/null'
# Display git branch
function parse_git_branch {
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ [\1]/'
}
function promps {
local BLUE="\[\e[1;34m\]"
local RED="\[\e[1;31m\]"
local GREEN="\[\e[1;32m\]"
local WHITE="\[\e[00m\]"
local GRAY="\[\e[1;37m\]"
case $TERM in
xterm*) TITLEBAR='\[\e]0;\W\007\]';;
*) TITLEBAR="";;
esac
local BASE="\u@\h"
PS1="${TITLEBAR}${WHITE}${BASE}${WHITE}:${WHITE}\W${BLUE}\$(parse_git_branch)${BLUE}\$${WHITE} "
}
promps
source ~/.git-completion.bash
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment