From f683896a114fb5fc34215e29de4870ab21e53112 Mon Sep 17 00:00:00 2001 From: Felix Nehrke Date: Fri, 3 Jan 2025 15:58:10 +0100 Subject: [PATCH] Simplify bash-prompt --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index 355c2f0..92ebabf 100644 --- a/.bashrc +++ b/.bashrc @@ -23,6 +23,7 @@ GIT_PROMPT_SH=/usr/lib/git-core/git-sh-prompt [ ! -d $(dirname $GIT_PROMPT_SH) ] && GIT_PROMPT_SH=/usr/local/etc/bash_completion.d/git-prompt.sh if [ -d $(dirname $GIT_PROMPT_SH) ]; then + PS1='\033[01;32m\u@\h\033[0m: \033[01;34m\w\033[0m \t\n\$ ' export GIT_PS1_SHOWCOLORHINTS=1 export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWSTASHSTATE=1 @@ -30,8 +31,7 @@ if [ -d $(dirname $GIT_PROMPT_SH) ]; then export GIT_PS1_SHOWUPSTREAM='auto' if [ -f $GIT_PROMPT_SH ]; then . $GIT_PROMPT_SH - PS1='\t \[\e]0;\u@\h: \w$(__git_ps1)\a\]${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\w\[\033[00m\] \t$(__git_ps1 " (%s)") \$ ' - MY_GIT_PROMPT_COMMAND='__git_ps1 "\[\e]0;\u@\h: \w \t$(__git_ps1) \a\]\[\033[01;32m\]\u@\h\[\033[00m\]: \[\033[01;34m\]\w\[\033[00m\] \t\n" "\\\$ " "(%s) ";' + MY_GIT_PROMPT_COMMAND='__git_ps1 "\033[01;32m\u@\h\033[0m: \033[01;34m\w\033[0m \t\n" "\\\$ " "(%s) "' PROMPT_COMMAND=${MY_GIT_PROMPT_COMMAND}${PROMPT_COMMAND} fi fi