fix(cli): force less to process ansi codes

I'm not certain how portable -r is for less. Fingers crossed!

Fix: #6488
This commit is contained in:
Henrik Lissner 2022-06-21 16:31:18 +02:00
parent 9f2d6262e5
commit b63b209dd3
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -1179,7 +1179,9 @@ ARGS are options passed to less. If DOOMPAGER is set, ARGS are ignored."
(set-file-modes tmpfile #o600)
(doom-cli--restart
(format "${DOOMPAGER:-less %s} <%s; rm -f%s %s"
(combine-and-quote-strings (or args '("+g")))
(combine-and-quote-strings
(append (if doom-print-backend '("-r")) ; process ANSI codes
(or (delq nil args) '("+g"))))
(shell-quote-argument tmpfile)
(if doom-debug-p "v" "")
(shell-quote-argument tmpfile))