dot

packages and services management
Log | Files | Refs | README

commit 2c4ef1386340d29dbb56cc703391f14685bed6e1
parent bf4c0b7d3b819bceb311bac03dd838a4fb8a86af
Author: Josuah Demangeon <mail@josuah.net>
Date:   Sat, 17 Nov 2018 11:22:26 +0100

mblaze: bin/mail-* commands

Diffstat:
Dbin/m | 50--------------------------------------------------
Dbin/mail-com | 4----
Mbin/mail-list | 2+-
3 files changed, 1 insertion(+), 55 deletions(-)

diff --git a/bin/m b/bin/m @@ -1,50 +0,0 @@ -#!/bin/sh - -FORMAT='\n%c%4n %i%s\n %t%u %i%D %40f' -MAILDIR=${MAILDIR:-$HOME/mail} - -test "$#" = 0 && while printf '> '; read argv; do "$0" $argv; done - -cmd=${1#-} -shift - -case "$cmd" in -(v) - FILE="$(mktemp /tmp/html_mail.XXXXXXXXXXXXXXX)" - mv "$FILE" "${FILE}.html" - FILE="${FILE}.html" - mshow -O $1 $(mshow -t $1 | awk -F ':' '/html/ {print $1 }')> "$FILE" - links "$FILE" - rm "$FILE" - ;; -(l) - find "$MAILDIR" -type d | - sed -r 's,^/,,; /\/(new|cur|tmp)$/d; s,[^/]*/, ,g' - ;; -(u) - mbsync -aq - exec "$0" scan - ;; -(f) - mfilter "$MAILDIR" - ;; -(*) - printf ' -\033[1m Display mail \033[m - h summarize the headers of the mail in a list - p print the current or specified mail - v view the html version with links - l list available directories - -\033[1m Exchange mail\033[m - w write a new mail - r reply to current or specified mail - u update the local mail from the server - -\033[1m Edit and move\033[m - s mark mail as seen - d mark mail as deleted - f filter mails again - -' ;; -esac diff --git a/bin/mail-com b/bin/mail-com @@ -1,4 +0,0 @@ -#!/usr/bin/env execlineb -backtick x { dollarat -d "\n" } importas -s -d "\n" @ x - -mcom $@ diff --git a/bin/mail-list b/bin/mail-list @@ -3,7 +3,7 @@ backtick -n x { whoami } importas user x backtick -n x { homeof $x } importas home x multisubstitute { importas -D INBOX INBOX 1 - importas -D $home MAILDIR MAILDIR + importas -D ${home}/mail MAILDIR MAILDIR define FORMAT "\\n%c%4n %i%s\\n %t%u %i%D %40f" }