beatific: fix PS1 with spaces

This commit is contained in:
Tim Van Baak 2024-01-31 00:06:09 +00:00
parent 265ed5b9e7
commit bf4b31f4fc

View File

@ -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