unofficial mirror of bug-guix@gnu.org 
 help / color / mirror / code / Atom feed
From: "Ludovic Courtès" <ludo@gnu.org>
To: Lars-Dominik Braun <lars@6xq.net>
Cc: 41811@debbugs.gnu.org
Subject: bug#41811: `guix search` shows control sequences
Date: Sat, 13 Jun 2020 22:54:08 +0200	[thread overview]
Message-ID: <87d062wutr.fsf@gnu.org> (raw)
In-Reply-To: <20200611171838.GA341429@noor.fritz.box> (Lars-Dominik Braun's message of "Thu, 11 Jun 2020 19:18:38 +0200")

[-- Attachment #1: Type: text/plain, Size: 388 bytes --]

Hi,

Lars-Dominik Braun <lars@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’.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 750 bytes --]

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")))))

  reply	other threads:[~2020-06-13 20:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-11 17:18 bug#41811: `guix search` shows control sequences Lars-Dominik Braun
2020-06-13 20:54 ` Ludovic Courtès [this message]
2020-06-14  6:09   ` Lars-Dominik Braun
2020-06-14 13:46     ` Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87d062wutr.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=41811@debbugs.gnu.org \
    --cc=lars@6xq.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).