diff options
author | Dominik Ritter <dritter03@googlemail.com> | 2018-08-08 02:00:43 +0300 |
---|---|---|
committer | Dominik Ritter <dritter03@googlemail.com> | 2018-08-08 02:00:43 +0300 |
commit | 39fe5217c6346297def6d811889fcde5c1e3fc30 (patch) | |
tree | ab41d615ad084e825a6f3b5e611d5dea41a45f15 /functions/colors.zsh | |
parent | e970a021c867976c52365c7d6b731b561539966e (diff) |
Pad colors with zeroes
Diffstat (limited to 'functions/colors.zsh')
-rwxr-xr-x | functions/colors.zsh | 3 |
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 |