guix_mirror_bot pushed a commit to branch master
in repository guix.
commit ae60bb61c04b97c01a39a177b3fda9583e6d8ad1
Author: Andrei Șova <[email protected]>
AuthorDate: Thu Nov 5 22:28:27 2026 -0700
ui: Fix pager text wrapping with long lines.
The comment about hyperlinks is outdated, according to my installed less, it
seems that -R preserves hyperlinks and is very recommended over -r. This
allows long lines to wrap correctly on slimmer terminals, where some content
would be cropped otherwise.
Fixes #12283
Signed-off-by: Ludovic Courtès <[email protected]>
Merges: #12337
---
guix/ui.scm | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index 749529eaa44..758784a2d49 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1941,19 +1941,15 @@ available."
""))
(define* (call-with-paginated-output-port proc
- #:key (less-options "FrX"))
+ #:key (less-options "FRX"))
(let ((pager-command-line (find-available-pager)))
;; Setting PAGER to the empty string conventionally disables paging.
(if (and (not (string-null? pager-command-line))
(isatty?* (current-output-port)))
;; Set 'LESS' so that 'less' exits if everything fits on the screen
- ;; (F), lets ANSI escapes through (r), does not send the termcap
+ ;; (F), lets ANSI escapes through (R), does not send the termcap
;; initialization string (X). Set it unconditionally because some
;; distros set it to something that doesn't work here.
- ;;
- ;; For things that produce long lines, such as 'guix processes', use
- ;; 'R' instead of 'r': this strips hyperlinks but allows 'less' to
- ;; make a good estimate of the line length.
(let* ((pager (with-environment-variables `(("LESS" ,less-options))
(apply open-pipe* OPEN_WRITE
;; Split into arguments. Treat runs of multiple