From 75de2494d77ce867ac3574f46ea2c5920a47f9a1 Mon Sep 17 00:00:00 2001 From: Kamen Mladenov Date: Mon, 4 Nov 2024 09:35:59 +0200 Subject: fix(bash): Fix directory not being on newline when it's the only event above PS1 --- .bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.bashrc b/.bashrc index e44047d..c211a18 100644 --- a/.bashrc +++ b/.bashrc @@ -131,7 +131,7 @@ [ ! -w . ] && DIRCOLOR=$PS_WARN DIR="${PWD/#$HOME/\~}" - [ -z "$___dirchanged" ] && DIR='' || ___dirchanged='' + [ -z "$___dirchanged" ] && DIR='' if [ -n "$DIR" ] then @@ -174,7 +174,7 @@ export PS1="$(left_cap)\$(ps_user)$(right_cap) \$(ps_precursor) " export PS0=" $(left_cap 'o' "$PS_TRIANGLE_BOT") \A$(right_cap)\n\$(kill -s SIGUSR2 $$)" - export PROMPT_COMMAND='EXSTAT="$?";seconds="$SECONDS";___changes="";___git_printed="";'$PS_COMM'; ___timer="n"' + export PROMPT_COMMAND='EXSTAT="$?";seconds="$SECONDS";___changes="";___git_printed="";'$PS_COMM';___dirchanged=''; ___timer="n"' # Honorable mention to: https://lists.gnu.org/archive/html/help-bash/2022-02/msg00023.html # }}} -- cgit v1.2.3