From 576e1adb63e9acfdbe633cbd5d027b8093e921c2 Mon Sep 17 00:00:00 2001 From: Michael Grote Date: Wed, 17 Apr 2024 11:40:07 +0200 Subject: [PATCH] bash: PS1 dont expand home --- .bash_extra | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.bash_extra b/.bash_extra index 5708b02..47ecafb 100644 --- a/.bash_extra +++ b/.bash_extra @@ -31,7 +31,7 @@ export GIT_PS1_SHOWUNTRACKEDFILES=1 export GIT_PS1_SHOWDIRTYSTATE=1 export GIT_PS1_SHOWSTASHSTATE=1 export GIT_PS1_SHOWCONFLICTSTATE="yes" -export PS1="\n${BLUE}\u${GREEN}@${ORANGE}\$(cat /etc/hostname) \$(pwd | sed -E -e "s#/#${RED}/${RESET}${GREEN}#g")${YELLOW}\$(__git_ps1)${RESET}\n> " +export PS1="\n${BLUE}\u${GREEN}@${ORANGE}\$(cat /etc/hostname) ${GREEN}\$(dirs +0 | sed -E -e "s#/#${RED}/${RESET}${GREEN}#g")${YELLOW}\$(__git_ps1)${RESET}\n> " # https://unix.stackexchange.com/questions/105958/terminal-prompt-not-wrapping-correctly # alle Farben sind mit \[\] escaped, sonst kann die shell die länge nicht richtig ausrechnen # https://github.com/git/git/blob/master/contrib/completion/git-prompt.sh