GNU bug report logs -
#41811
`guix search` shows control sequences
Previous Next
Reported by: Lars-Dominik Braun <lars <at> 6xq.net>
Date: Thu, 11 Jun 2020 17:19:02 UTC
Severity: normal
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
[Message part 1 (text/plain, inline)]
Hi,
Lars-Dominik Braun <lars <at> 6xq.net> skribis:
> $ env | grep -i less
> LESS=-R -M --shift 5
> LESSOPEN=|lesspipe %s
> PAGER=/usr/bin/less
> $ less --version
> less 551 (PCRE2 regular expressions)
> […]
No control sequences if you do “unset LESS” before hand, right?
I think we’ll just override ‘LESS’ unconditionally as shown below.
Thanks,
Ludo’.
[Message part 2 (text/x-patch, inline)]
diff --git a/guix/ui.scm b/guix/ui.scm
index 98b30445c8..2595e44062 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -1563,8 +1563,7 @@ zero means that PACKAGE does not match any of REGEXPS."
;; Set 'LESS' so that 'less' exits if everything fits on the screen (F),
;; lets ANSI escapes through (r), does not send the termcap
;; initialization string (X).
- (let ((pager (with-environment-variables `(("LESS"
- ,(or (getenv "LESS") "FrX")))
+ (let ((pager (with-environment-variables `(("LESS" "FrX"))
(open-pipe* OPEN_WRITE
(or (getenv "GUIX_PAGER") (getenv "PAGER")
"less")))))
This bug report was last modified 4 years and 338 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.