[ -d invoices/ ] || return 0
printf '[h1 Open]'
- for i in invoices/*; do case "$(line <$i)" in
+ for i in invoices/*; do case "$(sed 1q <$i)" in
*status=open*) list_invoice "$i";;
*status=*) :;;
*) list_invoice "$i";;
for n in resent:Resent sent:Sent paid:Paid cancelled:Cancelled; do
printf '[h1 %s]' "${n#*:}"
- for i in invoices/*; do case "$(line <$i)" in
+ for i in invoices/*; do case "$(sed 1q <$i)" in
*status=${n%:*}*) list_invoice "$i";;
esac; done
done