Use a magenta hexagon instead of 🔹 in the PS1

... because of its likeness to the Toolbox logo. Note that the magenta
foreground colour is requested through a terminal escape sequence with
SGR parameters [1]. The specific colour code for magenta is 35.

The main body of the PS1 needs to be split out to prevent Bash from
complaining:
  bash: printf: missing unicode digit for \u

[1] https://en.wikipedia.org/wiki/ANSI_escape_code

https://github.com/debarshiray/toolbox/pull/150
This commit is contained in:
Debarshi Ray 2019-05-06 16:08:14 +02:00
parent 2da4cc4634
commit de67ff4bcc
1 changed files with 1 additions and 1 deletions

View File

@ -25,7 +25,7 @@ fi
if [ -f /run/.containerenv ] \
&& [ -f /run/.toolboxenv ]; then
PS1="🔹[\u@\h \W]\\$ "
PS1=$(printf "\033[35m⬢\033[0m%s" "[\u@\h \W]\\$ ")
if ! [ -f "$toolbox_welcome_stub" ]; then
echo ""