Skip to content

Commit

Permalink
profile.d: prepend purple hexagon to PS1 rather than overwriting it
Browse files Browse the repository at this point in the history
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.

#1517

Signed-off-by: Jens Petersen <[email protected]>
  • Loading branch information
juhp committed Jul 7, 2024
1 parent cb6eee8 commit 223fd86
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions profile.d/toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,9 @@ fi

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

if [ -n "${BASH_VERSION:-}" ] || [ -n "${ZSH_VERSION:-}" ]; then
PS1="\[\e[35m\]⬢ \[\e[0m\]$PS1"
fi
if ! [ -f "$toolbox_welcome_stub" ]; then
echo ""
echo "Welcome to the Toolbx; a container where you can install and run"
Expand Down

0 comments on commit 223fd86

Please sign in to comment.