I use a print script that I call in my
It has worked in the past but I haven't had ocassion to print email in a while and it isn't working now. I have been tinkering with the script and it seems like neomutt is not passing the email message itself with the print command.
print.sh script itself is as follows:
#!/bin/bash input="$1" pdir="$HOME/Desktop" open_pdf=evince # check to make sure that enscript and ps2pdf are both installed if ! command -v enscript >/dev/null || ! command -v ps2pdf >/dev/null; then echo "ERROR: both enscript and ps2pdf must be installed" 1>&2 exit 1 fi # create temp dir if it does not exist if [ ! -d "$pdir" ]; then mkdir -p "$pdir" 2>/dev/null if [ $? -ne 0 ]; then echo "Unable to make directory '$pdir'" 1>&2 exit 2 fi fi tmpfile="`mktemp $pdir/mutt_XXXXXXXX.pdf`" enscript --font=Courier8 $input -2r --word-wrap --fancy-header=mutt --encoding=88593 -p - 2>/dev/null | ps2pdf - $tmpfile $open_pdf $tmpfile >/dev/null 2>&1 & sleep 1 rm $tmpfile
If I add
echo "INPUT: $1" or
echo "INPUT: $input", all I see when the command runs is
INPUT:. How do I ensure that neomutt passes the actual email to the