Set /bin/cat as pager

Ledger's command line does not respect any pager related flag (e.g.
--no-pager). So the only resort is to set a pager ourselves being /bin/cat.
This commit is contained in:
Bram Schoenmakers 2023-04-11 23:08:00 +02:00
parent 256ae53e69
commit 9d54ca3e7d

View file

@ -50,7 +50,8 @@ variable, otherwise a prompt will appear to select a file."
(interactive (list (or comint-ledger-file-path
(read-file-name "Ledger file: "))))
(let* ((ledger-program comint-ledger-cli-path)
(ledger-file-arguments (list "--no-pager" "-f" ledger-file))
(ledger-file-arguments (list "-f" ledger-file))
(process-environment (append process-environment '("PAGER=/bin/cat")))
(ledger-arguments (append ledger-file-arguments comint-ledger-cli-arguments))
(buffer (get-buffer-create comint-ledger-buffer-name))
(proc-alive (comint-check-proc buffer)))