Fix printf in prompt

Signed-off-by: Aleksandar 'The Cobra' Widulski <thecobra@riseup.net>
This commit is contained in:
Aleksandar 'The Cobra' Widulski 2022-03-04 14:16:55 -05:00
parent 28efe8e906
commit a7d441da71
1 changed files with 3 additions and 3 deletions

View File

@ -123,11 +123,11 @@ __prompt() {
# Text
# [INT], [4], etc.
local SIG="$([ $PEC -ne 0 ] && printf "$BLU[$RED$(__sig $PEC)$BLU] ")"
local SIG="$([ $PEC -ne 0 ] && printf '%s[%s%s%s] ' "$BLU" "$RED" "$(__sig $PEC)" "$BLU")"
# [user@homeserver:~]
local CLR="$([ $UID -eq 0 ] && printf $RED || printf $YLW)"
local UHD="$BLD$BLU[$CLR\u$PRP@$CYN\h$PRP:$GRN\w$BLU]"
local COL="$([ $UID -eq 0 ] && printf %s "$RED" || printf %s "$YLW")"
local UHD="$BLD$BLU[$COL\u$PRP@$CYN\h$PRP:$GRN\w$BLU]"
# 2y 351d 12m 43s 382969μs
local TIME="$YLW$(__get_cmd_time)"