hledger/hledger-ui/test/hledgerui2txt
2020-11-15 12:17:00 -08:00

5 lines
256 B
Bash
Executable File

#!/bin/sh
# Convert hledger-ui's output to plain text. Extracted from uitest.sh, see comments there.
exec perl -pe 's/\e\[\d+;1H/\n/g; s/\e\[?.*?[\@-~]//g; s/$/\n/;' | \
perl -ne 's/(─)+/---/; s/(─)+//; s/ +$//; print unless /^$/' # or /\?:help/'