Skip to content

Commit 3793a38

Browse files
committed
profile.d/toolbox.sh: set PS1 as explicit string constants
since they are constants 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 <[email protected]> containers#1514
1 parent cb6eee8 commit 3793a38

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

profile.d/toolbox.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@ fi
4848

4949
if [ -f /run/.containerenv ] \
5050
&& [ -f /run/.toolboxenv ]; then
51-
[ "${BASH_VERSION:-}" != "" ] && PS1=$(printf "\[\033[35m\]⬢\[\033[0m\]%s" "[\u@\h \W]\\$ ")
52-
[ "${ZSH_VERSION:-}" != "" ] && PS1=$(printf "\033[35m⬢\033[0m%s" "[%n@%m]%~%# ")
51+
[ "${BASH_VERSION:-}" != "" ] && PS1='\[\e[35m\]⬢\[\e[0m\][\u@\h \W]\$ '
52+
[ "${ZSH_VERSION:-}" != "" ] && PS1=$'\e[35m⬢\e[0m[%n@%m]%~%# '
5353

5454
if ! [ -f "$toolbox_welcome_stub" ]; then
5555
echo ""

0 commit comments

Comments
 (0)