Skip to content

Instantly share code, notes, and snippets.

@oleksandr-diudiun
Created October 19, 2017 15:19
Show Gist options
  • Save oleksandr-diudiun/76d9e3b806ae72efc9692071c3ac103e to your computer and use it in GitHub Desktop.
Save oleksandr-diudiun/76d9e3b806ae72efc9692071c3ac103e to your computer and use it in GitHub Desktop.
Bash Profile
if [ -f ~/.git-completion.bash ]; then
. ~/.git-completion.bash
fi
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
fi
export GITAWAREPROMPT=~/.bash/git-aware-prompt
source "${GITAWAREPROMPT}/main.sh"
export PS1="\W \[$txtcyn\]\$git_branch\[$txtred\]\$git_dirty\[$txtrst\]\$ "
export SUDO_PS1="\[$bakred\]\u@\h\[$txtrst\] \w\$ "
alias ls='ls $LS_OPTIONS -hA'
alias ll='ls $LS_OPTIONS -lAh'
alias l='ls $LS_OPTIONS -lAh'
alias cd..="cd .."
alias cd.="cd .."
alias ..="cd .."
alias ~="cd ~"
alias c="clear"
alias e="exit"
alias .="open ."
alias mkdir='mkdir -pv'
alias now='date +"%d-%m-%Y %T"'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment