mirror of
https://github.com/simonmichael/hledger.git
synced 2024-12-29 13:22:27 +03:00
5 lines
256 B
Bash
Executable File
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/'
|