All patches and comments are welcome. Please squash your changes to logical
commits before using git-format-patch and git-send-email to
patches@git.madduck.net.
If you'd read over the Git project's submission guidelines and adhered to them,
I'd be especially grateful.
5 if [ -z "$TMPDIR" ]; then
7 elif [ -d "${TMPDIR}/volatile" ]; then
8 TMPDIR="${TMPDIR}/volatile"
11 TMPDIR=$(mktemp -dp "$TMPDIR" mutt.XXXXXXXXXX)
12 trap "rm -rf '$TMPDIR'" 1 2 3 4 5 6 7 8 10 11 12 13 14 15
15 TEMPFILE="${TMPDIR}/${BASENAME}"
18 if [ -x "$(command -v awesome-client)" ]; then
19 awesome-client <<-_eof
20 local naughty = require("naughty")
21 naughty.notify({ preset = naughty.config.presets.low,
24 $(sed -e 's,\",\\\",g' "$1")
26 $(sed -e 's,\",\\\",g' "$2")]]
34 # make a copy of the file, then launch a shell process in the background
35 # to divert to run-mailcap, after which the temporary directory gets
40 run-mailcap --action=view "$MIMETYPE":"$TEMPFILE"
42 if [ -s "$TMPDIR/output.stdout" ] || [ -s "$TMPDIR/output.stderr" ]; then
43 notify $TMPDIR/output.stdout $TMPDIR/output.stderr \
44 "Output from mutt/$SELF on $BASENAME"
47 trap - 1 2 3 4 5 6 7 8 10 11 12 13 14 15
50 # hack to stay around until the browser has read the file: make a fifo and
51 # wait for the cat process to finish writing to it, which means that it
52 # must have been consumed on the other end.
55 cat "$INPUTFILE" > $TEMPFILE &
56 sensible-browser "$TEMPFILE" > $TMPDIR/output.stdout 2> $TMPDIR/output.stderr