From b63b209dd30a445210726ddb3c33981122caff38 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Tue, 21 Jun 2022 16:31:18 +0200 Subject: [PATCH] fix(cli): force less to process ansi codes I'm not certain how portable -r is for less. Fingers crossed! Fix: #6488 --- core/core-cli-lib.el | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/core/core-cli-lib.el b/core/core-cli-lib.el index 313622fd0..32e469b1e 100644 --- a/core/core-cli-lib.el +++ b/core/core-cli-lib.el @@ -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))