Skip to content

Commit 2fab5e5

Browse files
committed
profile.d: prepend purple hexagon to PS1 rather than overwriting it
This also avoids the need to have separate definitions for bash and zsh More importantly it means the traditional Red Hat style bash prompt is not forced onto all other OS toolboxes too.
1 parent cb6eee8 commit 2fab5e5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

profile.d/toolbox.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ 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]%~%# ")
53-
51+
if [ -n "${BASH_VERSION:-}" ] || [ -n "${ZSH_VERSION:-}" ]; then
52+
PS1="\[\e[35m\]⬢ \[\e[0m\]$PS1"
53+
fi
5454
if ! [ -f "$toolbox_welcome_stub" ]; then
5555
echo ""
5656
echo "Welcome to the Toolbx; a container where you can install and run"

0 commit comments

Comments
 (0)