summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
authorKamen Mladenov <kamen@syndamia.com>2024-11-04 09:35:59 +0200
committerKamen Mladenov <kamen@syndamia.com>2024-11-04 09:35:59 +0200
commit75de2494d77ce867ac3574f46ea2c5920a47f9a1 (patch)
tree98a277a73f9aff035dc20dba53223e969ec1e0c0 /.bashrc
parent5a6c0ac91eac9d5184e9f16e26c15d5027375362 (diff)
downloaddotfiles-75de2494d77ce867ac3574f46ea2c5920a47f9a1.tar
dotfiles-75de2494d77ce867ac3574f46ea2c5920a47f9a1.tar.gz
dotfiles-75de2494d77ce867ac3574f46ea2c5920a47f9a1.zip
fix(bash): Fix directory not being on newline when it's the only event above PS1
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc4
1 files 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
# }}}