From 76ec02204ade3ca9ae7225d2b132f0847486207b Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Fri, 28 Jun 2024 16:15:56 +0800 Subject: [PATCH] profile.d/toolbox.sh: set bash PS1 as explicit string constant since it is constant there is no need to use printf and embed binary color codes, which also made it hard to match on toolbox PS1. Signed-off-by: Jens Petersen https://github.com/containers/toolbox/pull/1514 --- profile.d/toolbox.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/profile.d/toolbox.sh b/profile.d/toolbox.sh index d2e16cbd7..9d173cc29 100644 --- a/profile.d/toolbox.sh +++ b/profile.d/toolbox.sh @@ -48,7 +48,7 @@ fi if [ -f /run/.containerenv ] \ && [ -f /run/.toolboxenv ]; then - [ "${BASH_VERSION:-}" != "" ] && PS1=$(printf "\[\033[35m\]⬢\[\033[0m\]%s" "[\u@\h \W]\\$ ") + [ "${BASH_VERSION:-}" != "" ] && PS1='\[\e[35m\]⬢\[\e[0m\][\u@\h \W]\$ ' [ "${ZSH_VERSION:-}" != "" ] && PS1=$(printf "\033[35m⬢\033[0m%s" "[%n@%m]%~%# ") if ! [ -f "$toolbox_welcome_stub" ]; then