Update .ps1 to include git branch

This commit is contained in:
fanyx 2021-05-19 11:46:36 +02:00
parent 3af0c4633e
commit 3359798286
2 changed files with 13 additions and 1 deletions

3
.alias
View File

@ -8,5 +8,8 @@ alias la="ll -a"
# applications
alias code="codium"
# git
alias gs="git status --short"
# dotfiles
alias dot="/usr/bin/git --git-dir=$HOME/git/dotfiles/ --work-tree=$HOME"

11
.ps1
View File

@ -1,2 +1,11 @@
PS1='\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
#!/bin/bash
[[ -f /etc/bash_completion.d/git-prompt ]] && . /etc/bash_completion.d/git-prompt
NC='\[\033[00m\]'
GREEN='\[\033[01;32m\]'
YELLOW='\[\033[01;33m\]'
BLUE='\[\033[01;34m\]'
PS1="${GREEN}\u@\h${NC}:${BLUE}\w${YELLOW}\$(__git_ps1 ' [%s]')${NC} \$ "