From: Antero Mejr via Guix-patches via <guix-patches@gnu.org>
To: 62222@debbugs.gnu.org
Cc: ludo@gnu.org
Subject: [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed.
Date: Thu, 16 Mar 2023 16:11:20 +0000 [thread overview]
Message-ID: <20230316161120.9294-1-antero@mailbox.org> (raw)
When display-hint is given format specifiers such as "~%" but no arguments,
it does not format the output, causing the specifiers to be visible in the
displayed text.
* guix/ui.scm (display-hint): Format output when no arguments are passed.
---
Steps to reproduce the issue this fixes:
$ guix build -s whatever hello
guix build: error: 'whatever' is not a supported system
hint: Try `--list-systems' to view available system types.~%
guix/ui.scm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/guix/ui.scm b/guix/ui.scm
index b6c3bd04ba..7540e2194f 100644
--- a/guix/ui.scm
+++ b/guix/ui.scm
@@ -323,7 +323,7 @@ (define colorize
;; XXX: We should arrange so that the initial indent is wider.
(parameterize ((%text-width (max 15 (- (terminal-columns) 5))))
(texi->plain-text (match arguments
- (() message)
+ (() (format #f message))
(_ (apply format #f message
(map (match-lambda
((? string? str)
--
2.38.1
next reply other threads:[~2023-03-16 16:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 16:11 Antero Mejr via Guix-patches via [this message]
2023-03-17 21:08 ` bug#62222: [PATCH] ui: format 'display-hint' output when no arguments are passed 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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230316161120.9294-1-antero@mailbox.org \
--to=guix-patches@gnu.org \
--cc=62222@debbugs.gnu.org \
--cc=antero@mailbox.org \
--cc=ludo@gnu.org \
/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 external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.