From 1b538235ea2c25b105687d8dddc1c384b5b1a258 Mon Sep 17 00:00:00 2001 From: Hsieh Chin Fan Date: Mon, 3 Feb 2025 16:25:44 +0800 Subject: Update --- bin/mail/deliver.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/bin/mail/deliver.sh b/bin/mail/deliver.sh index ef3d461..aba07ef 100755 --- a/bin/mail/deliver.sh +++ b/bin/mail/deliver.sh @@ -153,6 +153,8 @@ fi set_stdout && print_mail # log to stderr -echo -e ${date} ${mailbox:-INBOX} '\t' "${heading:-${SUBJECT}}" >&2 +declare -i width_mailbox=$(wc -c <<<"${mailbox:-INBOX}") +spaces="$(printf %$(( 18 - ${width_mailbox} ))s)" +echo -e ${date} ${mailbox:-INBOX} "$spaces" "${heading:-${SUBJECT}}" >&2 # vim:fdm=marker fdl=0 -- cgit v1.2.3-70-g09d2