From 5dc6306d3edd285785eecc5e05b295d23c0217b3 Mon Sep 17 00:00:00 2001 From: Peder Bergebakken Sundt Date: Thu, 30 Jan 2025 18:31:59 +0100 Subject: [PATCH] lkasdlksjd --- users/pbsds/home/profiles/bashrc.d/ps1.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/users/pbsds/home/profiles/bashrc.d/ps1.sh b/users/pbsds/home/profiles/bashrc.d/ps1.sh index 35d1a03..8a58030 100644 --- a/users/pbsds/home/profiles/bashrc.d/ps1.sh +++ b/users/pbsds/home/profiles/bashrc.d/ps1.sh @@ -3,6 +3,7 @@ ps1_parse_git_branch() { git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' return $retcode } +# TODO: this somehow corrupts the cursor location ps1_retcode_color() { local retcode=$? [ $? -eq 0 ] \ @@ -10,4 +11,5 @@ ps1_retcode_color() { || echo -e '\e[33m' return $retcode } -export PS1='\[\033[01;32m\]\u@\h\[\033[01;37m\] \[\033[01;34m\]\W\[\033[33m\]$(ps1_parse_git_branch)$(ps1_retcode_color)\$\[\033[00m\] ' +# export PS1='\[\033[01;32m\]\u@\h\[\033[01;37m\] \[\033[01;34m\]\W\[\033[33m\]$(ps1_parse_git_branch)$(ps1_retcode_color)\$\[\033[00m\] ' +export PS1='\[\033[01;32m\]\u@\h\[\033[01;37m\] \[\033[01;34m\]\W\[\033[33m\]$(ps1_parse_git_branch)\[\033[01;32m\]\$\[\033[00m\] '