From 8a0d9d77bfc3bb696275d0b21c778eb3c3b18226 Mon Sep 17 00:00:00 2001 From: Armaan Bhojwani Date: Mon, 22 Feb 2021 11:23:23 -0500 Subject: [PATCH] kiss-mail: improve UI --- kiss-mail/checksums | 2 +- kiss-mail/files/kiss-mail | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/kiss-mail/checksums b/kiss-mail/checksums index 1b4b915..02f80d5 100644 --- a/kiss-mail/checksums +++ b/kiss-mail/checksums @@ -1 +1 @@ -a367d0c5599ccaf1b5fe9f7a65d23cfc8d87ff36759473ddd9aa91bd7aea0358 +eba6a230bdd16295f00bdd4df496656b1f3ed3f42c2a5b0e06294e1c4c9ef9be diff --git a/kiss-mail/files/kiss-mail b/kiss-mail/files/kiss-mail index e6574b3..f237688 100755 --- a/kiss-mail/files/kiss-mail +++ b/kiss-mail/files/kiss-mail @@ -7,16 +7,15 @@ get_mail() { git_root=$(git -C ${repo} rev-parse --show-toplevel) if [ -f ${git_root}/update ]; then shortlog=$(git -C ${git_root} log --pretty=oneline --follow -- update) - while IFS= read -r line; do - hash=$(echo ${line} | cut -d ' ' -f 1) + hash=$(printf ${line} | cut -d " " -f 1) git -C ${git_root} show ${hash}:update | tail -n +2 > /tmp/kiss-mail - printf '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n' - printf %s $((i = i + 1)) + printf "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n" + printf "Item: %s" $((i = i + 1)) printf "\n" - git -C ${git_root} show -s ${hash} - printf '+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n' + git -C ${git_root} show -s ${hash} | tail -n +2 + printf "+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++\n" /tmp/kiss-mail printf "\n\n" @@ -27,5 +26,5 @@ EOF done } -[ -z ${PAGER} ] || pager_l=${PAGER} && pager_l="less" +[ -z ${PAGER} ] || pager_l=${PAGER} && pager_l="less -R" get_mail | ${pager_l} -- 2.39.2