Skip to content

Instantly share code, notes, and snippets.

@jonas-jonas
Last active May 12, 2018 09:04
Show Gist options
  • Save jonas-jonas/7571942aa37d5ba157df7eda277fa0ac to your computer and use it in GitHub Desktop.
Save jonas-jonas/7571942aa37d5ba157df7eda277fa0ac to your computer and use it in GitHub Desktop.
User specific aliases and functions
# get current branch in git repo
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
echo " [${BRANCH}${STAT}]"
else
echo ""
fi
}
export PS1="\[\e[1;36m\]\u \[\e[1;30m\]:: \[\e[1;33m\]\W\[\033[1;30m\]\`parse_git_branch\`\[\e[0m\]\$ "
alias ls='ls --color=auto'
alias la='ls -a'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment