1
0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-12-12 19:18:28 +02:00

Pad colors with zeroes

This commit is contained in:
Dominik Ritter 2018-08-08 01:00:43 +02:00
parent e970a021c8
commit 39fe5217c6

View File

@ -314,7 +314,8 @@ function foregroundColor() {
function getColorCode() {
# Early exit: Check if given value is already numerical
if [[ "$1" = <-> ]]; then
echo -n "$1"
# Pad color with zeroes
echo -n "${(l:3::0:)1}"
return
fi