guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 01/03: ui: Only display link in capable terminals.


From: Ludovic Courtès
Subject: Re: 01/03: ui: Only display link in capable terminals.
Date: Mon, 24 Feb 2020 16:35:01 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Hi!

address@hidden skribis:

> commit d7545a6b538813e88195d084f75a3e87065c999e
> Author: zimoun <address@hidden>
> AuthorDate: Mon Feb 17 14:16:53 2020 +0100
>
>     ui: Only display link in capable terminals.
>     
>     * guix/ui.scm (display-generation): Display generation path on new line.
>     * guix/scripts/describe.scm (channel-commit-hyperlink): Add TRANSFORMER 
> argument.
>     (display-profile-content): Use TRANSFORMER argument to display URL 
> explicitly
>     when terminal does not support hyperlinks.

[...]

> +                   (when (not (supports-hyperlinks?))

“unless”.

> +                     (format #t (G_ "    URL: ~a~%")
> +                             (channel-commit-hyperlink channel commit
> +                                                       (lambda (url msg) 
> url))))))

So people see less information on terminals that support hyperlinks,
right?

I think there should be as much information displayed whether or not the
terminal supports hyperlinks.  Otherwise it can be confusing.
(Especially since we can’t tell whether the terminal really supports
hyperlinks: we don’t know whether it displays clickable links.)

Thoughts?

> --- a/guix/ui.scm
> +++ b/guix/ui.scm
> @@ -1637,7 +1637,7 @@ DURATION-RELATION with the current time."
>      (let* ((file   (generation-file-name profile number))
>             (link   (if (supports-hyperlinks?)
>                         (cut file-hyperlink file <>)
> -                       identity))
> +                       (cut format #f (G_ "~a~%file: ~a") <> file)))
>             (header (format #f (link (highlight (G_ "Generation ~a\t~a")))

I understand it’s a matter of taste, but I’m not a fan of the extra
line here.

Ludo’.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]