* [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed.
@ 2023-03-16 16:11 Antero Mejr via Guix-patches via
2023-03-17 21:08 ` bug#62222: " Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Antero Mejr via Guix-patches via @ 2023-03-16 16:11 UTC (permalink / raw)
To: 62222; +Cc: ludo
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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* bug#62222: [PATCH] ui: format 'display-hint' output when no arguments are passed.
2023-03-16 16:11 [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed Antero Mejr via Guix-patches via
@ 2023-03-17 21:08 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2023-03-17 21:08 UTC (permalink / raw)
To: Antero Mejr; +Cc: 62222-done
Hi,
Antero Mejr <antero@mailbox.org> skribis:
> 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.
Oops, good catch! Applied, thanks.
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-17 21:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 16:11 [bug#62222] [PATCH] ui: format 'display-hint' output when no arguments are passed Antero Mejr via Guix-patches via
2023-03-17 21:08 ` bug#62222: " Ludovic Courtès
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).