aboutsummaryrefslogtreecommitdiff
path: root/functions
diff options
context:
space:
mode:
authorDominik Ritter <dritter03@googlemail.com>2018-08-08 02:00:43 +0300
committerDominik Ritter <dritter03@googlemail.com>2018-08-08 02:00:43 +0300
commit39fe5217c6346297def6d811889fcde5c1e3fc30 (patch)
treeab41d615ad084e825a6f3b5e611d5dea41a45f15 /functions
parente970a021c867976c52365c7d6b731b561539966e (diff)
Pad colors with zeroes
Diffstat (limited to 'functions')
-rwxr-xr-xfunctions/colors.zsh3
1 files changed, 2 insertions, 1 deletions
diff --git a/functions/colors.zsh b/functions/colors.zsh
index 758b3446..71ca7c9a 100755
--- a/functions/colors.zsh
+++ b/functions/colors.zsh
@@ -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