hledger
hledger copied to clipboard
hledger-ui should be able to read standard input
This should work:
~/src/hledger$ echo $TERM
xterm-256color
~/src/hledger$ cat examples/sample.journal | hledger-ui -f-
hledger-ui: getTerminalAttributes: invalid argument (Bad file descriptor)
Clarifying: hledger-ui is interactive, but it seems to me it should be able to read data from a redirected stdin, then run the normal interactive UI. Converting to a wish.
To redirect something to stdin, and then run interactively, you could run something like
cat file.txt - | hledger-ui -f-
(the second argument to cat
, -
, would tell cat
to copy stdin after it got to the end of file.txt
)
But it looks like this program tries to interact with the terminal as a terminal file, not just basic line-based IO that would work easily from a pipe...