Skip to content

Instantly share code, notes, and snippets.

@ekka21
Last active December 18, 2018 12:51
Show Gist options
  • Save ekka21/ff695670ab9d745f9d009158aabfeaf5 to your computer and use it in GitHub Desktop.
Save ekka21/ff695670ab9d745f9d009158aabfeaf5 to your computer and use it in GitHub Desktop.
#bash prompt with git branch
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
export PS1="\u@\h \[\033[32m\]\w\[\033[33m\]\$(parse_git_branch)\[\033[00m\] $ "
export PATH=~/.local/bin:$PATH
#aliases
alias c='clear'
alias lsa='ls -lah'
alias ..='cd ..'
alias d='docker'
alias dps='docker ps'
alias dpsa='docker ps -a'
alias di='docker images'
alias dc='docker-compose'
alias gst='git status'
alias gcm='git commit -m'
alias gfa='git fetch --all'
alias gpo='git push origin'
alias glog='git log --oneline --decorate --graph'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment