contrib/plan9/9mail
author Yuya Nishihara <yuya@tcha.org>
Sat, 17 May 2014 20:47:31 +0900
changeset 22159 db7921812f56
parent 19613 4bfd3c7160d9
permissions -rw-r--r--
alias: add test for alias command provided by disabled extension This should complete cases where "badalias" is set.

#!/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