contrib/plan9/9mail
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 13 Mar 2017 18:31:29 -0700
changeset 31396 ab3e9eab754f
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
formatter: support json formatting of long type By luck, we appear to not pass any long instances into the JSON formatter. I suspect this will change with all the Python 3 porting work. Plus I have another series that will convert some ints to longs that triggers this.

#!/bin/rc
# 9mail - Mercurial email wrapper for upas/marshal

fn usage {
	echo >[1=2] usage: mercurial/9mail -f from to [cc]
	exit usage
}

from=()
cc=()
to=()

switch($1){
case -f
	from=$2
case *
	usage
}

to=($3)
if(~ $#* 4)
	cc=(-C $4)

upasname=$from
upas/marshal $cc $to