From 8945e431c7b0c64dd4b1d508449943ba06f054a5 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 3 Nov 2021 19:51:42 +0100 Subject: use tmp_dir, show ellipsis of error --- khal-list | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/khal-list b/khal-list index d662ba2..d4cdd47 100755 --- a/khal-list +++ b/khal-list @@ -2,14 +2,19 @@ date_format='%F %H:%M' +tmp_dir=$(mktemp -d) +trap 'rm -rf --one-file-system "${tmp_dir:?}"' EXIT + script -qefc '/usr/bin/khal list '"$( date +"${date_format}" )"' '"$( date +"${date_format}" -d@$(( $(date +%s)+6*24*60*60 )) -)" /dev/null '"${tmp_dir}"'/stderr >'"${tmp_dir}"'/stdout' /dev/null