X-Git-Url: https://git.madduck.net/etc/mutt.git/blobdiff_plain/94e32abece4f7175e657eb6b0f20968eb320fa02..a90e989df8f50efce0f8df30d3b68c9e73e386a4:/.mutt/add-tickle-stamp?ds=inline diff --git a/.mutt/add-tickle-stamp b/.mutt/add-tickle-stamp index c712f61..b0c0ba1 100755 --- a/.mutt/add-tickle-stamp +++ b/.mutt/add-tickle-stamp @@ -22,8 +22,10 @@ else case "$arg" in *[0-9]w) date="now + ${arg%w} weeks 00:00";; *[0-9]m) date="now + ${arg%m} months 00:00";; - *[0-9]h) date="now + ${arg%h} hours";; *[0-9]d) date="now + ${arg%d} days 00:00";; + *[0-9]h) date="now + ${arg%h} hours";; + @[0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9][0-9]) + date="@${arg#@}";; *' '*) date="$args";; *[!0-9]*) echo "E: invalid argument: $arg" >&2 @@ -38,7 +40,8 @@ tickle=$(date +'%s (%c)' -d "$date") TMPFILE="$(tempfile -d /tmp -p tickle)" trap "rm -f $TMPFILE" 0 1 2 3 4 5 6 7 8 10 11 12 13 14 15 -formail -i "X-Tickle: $tickle" < $file > $TMPFILE +formail -i "X-Tickle: $tickle" < $file \ + | formail -R X-Postponed X-Was-Postponed > $TMPFILE [ -w "$file" ] && mv $TMPFILE $file