From bf4b31f4fcfe918b4f1ed38e07650681e6483b6c Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Wed, 31 Jan 2024 00:06:09 +0000 Subject: [PATCH] beatific: fix PS1 with spaces --- modules/bashrc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/bashrc b/modules/bashrc index faf9098..376f22b 100644 --- a/modules/bashrc +++ b/modules/bashrc @@ -12,8 +12,8 @@ _pwd_home () { # Shorten path dir names _pwd () { DIR=$(_pwd_home) - [ "$DIR" != "/" ] && [ "$DIR" != "~" ] && printf '%s/' $(dirname $DIR | tr / '\n' | cut -c-1) - printf $(basename $DIR) + [ "$DIR" != "/" ] && [ "$DIR" != "~" ] && printf '%s/' $(dirname "$DIR" | tr / '\n' | cut -c-1) + printf "$(basename "$DIR")" } _DIR='$(_pwd)' # Color codes