mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2026-09-18 08:20:10 +00:00
Pad colors with zeroes
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user