Skip to content

Commit

Permalink
profile.d/toolbox.sh: set PS1 as explicit string constants
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
juhp committed Jun 28, 2024
1 parent cb6eee8 commit 6ef6cd1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions profile.d/toolbox.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ 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]%~%# ")
[ "${BASH_VERSION:-}" != "" ] && PS1='\[\e[35m\]⬢\[\e[0m\][\u@\h \W]\$ '
[ "${ZSH_VERSION:-}" != "" ] && PS1=$'\e[35m⬢\e[0m[%n@%m]%~%# '

if ! [ -f "$toolbox_welcome_stub" ]; then
echo ""
Expand Down

0 comments on commit 6ef6cd1

Please sign in to comment.