From ec37cd51126032b956c92ff3d86e9e6113a16a68 Mon Sep 17 00:00:00 2001 From: Nachuan Tang Date: Sun, 24 Jul 2022 17:18:59 -0400 Subject: [PATCH] add default bash prompt --- bash_tools.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bash_tools.sh b/bash_tools.sh index 67fead8..e344edf 100644 --- a/bash_tools.sh +++ b/bash_tools.sh @@ -10,6 +10,11 @@ if [ ! -z "$ZSH_NAME" ]; then DOTFILE_DIR=${0:a:h}/ else SHELL_NAME=bash + + # display git status + export GIT_PS1_SHOWDIRTYSTATE=1 + + export PS1='\[\e[01;32m\]\w\[\e[01;35m\]$(__git_ps1 " (%s)")\[\e[00m\] ' DOTFILE_DIR=$(dirname ${BASH_SOURCE[0]})/ fi @@ -76,3 +81,4 @@ fi #alias ls=ls -At source $DOTFILE_DIR/bash_tools/fzf_file_seletor.sh +