From 3359798286f1ec864a18e77e77bb14db23be2295 Mon Sep 17 00:00:00 2001 From: fanyx Date: Wed, 19 May 2021 11:46:36 +0200 Subject: [PATCH] Update .ps1 to include git branch --- .alias | 3 +++ .ps1 | 11 ++++++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.alias b/.alias index 8d55e6b..92166be 100644 --- a/.alias +++ b/.alias @@ -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" diff --git a/.ps1 b/.ps1 index 7b1a851..4a327d1 100644 --- a/.ps1 +++ b/.ps1 @@ -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} \$ "