Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a template argument to hyrate default body #211

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
19 changes: 19 additions & 0 deletions mcom
Expand Up @@ -110,6 +110,7 @@ defaultc=e
hdrs=
resume=
noquote=
template=
case "$0" in
*mcom*)
hdr=to
Expand Down Expand Up @@ -137,6 +138,11 @@ case "$0" in
shift
fi
;;
-t)
shift
template="$1"
shift
;;
-send)
defaultc=justsend
shift;;
Expand Down Expand Up @@ -214,6 +220,11 @@ case "$0" in
-send)
defaultc=justsend
shift;;
-t)
shift
template="$1"
shift
;;
-noquote)
noquote=1
shift;;
Expand Down Expand Up @@ -403,6 +414,14 @@ fi
case "$0" in
*mbnc*) ;;
*)
if [ -n "$template" ]; then
if [ ! -r "$template" ]; then
printf "The template %s in unredeable\n" "$template" >&2
exit 1
fi
cat "$template"
fi

if [ -f "$MBLAZE/signature" ]; then
SIGNATURE="$MBLAZE/signature"
elif [ -f ~/.signature ]; then
Expand Down