coreutils
[Top][All Lists]
Advanced

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

Re: Feature request: ls --hyperlink


From: Pádraig Brady
Subject: Re: Feature request: ls --hyperlink
Date: Mon, 28 Aug 2017 01:51:48 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 28/08/17 01:11, Egmont Koblinger wrote:
> Hi,
> 
> One more possible approach I can think of (and I can commit this week) is to 
> make the dotted underline even lighter, let's say with a 1/3 fill ratio 
> instead of 1/2.
> 
> Edit src/vte.c at the "j = 0.125" loop, this loop is responsible for dotted 
> underlining "columns" number of consecutive cells. E.g. I've changed the 0.25 
> multiplier to 0.15 now (the result of the multiplication is somewhere later 
> on subject to integer conversion, no antialiasing will kick in) and I'm happy 
> with that look.
> 
> Are you happy with such lighter underline as a compromise, or would you 
> rather still have some means of disabling underlining?
> 
> (The current exact underlining look wasn't "designed". I just happened to 
> code it up quickly to have something to begin with, and then I found it good 
> enough not to change :))
> 
> e.
> 
> 
> On Mon, Aug 28, 2017 at 9:37 AM, Egmont Koblinger <address@hidden 
> <mailto:address@hidden>> wrote:
> 
>     Hi,
> 
>         Now this wouldn't be an issue if the URIs weren't highlighted by 
> default.
>         When you have a block of URIs, having them all underlined (albeit 
> dotted)
>         is noisy and would at least for me mean I wouldn't enable --hyperlink
>         by default for ls. It would be very useful for apps like ls to 
> indicate
>         whether they wanted an indicator by default.
>         How about we support hl=# parameter, where 1 = hover only, 2 = both ?
> 
> 
>     I also found it dense, or "noisy" as you call it, for a few days. Then I 
> got totally used to it. The dotted underline is not that heavy or distracting.
> 
>     Right now the goal is to spread this feature and make it discoverable for 
> users. Removing the dotted underline would be a step backwards in this goal. 
> (I understand it'd still be underlined on hover and the mouse pointer shape 
> altered too.)
> 
>     It's not a trivial question who should control the look of URLs: 1: the 
> terminal emulator (leaving no way for the app to override), 2: the emitting 
> app (resulting in an inconsistent look across apps), or 3: some combination 
> of both.
> 
>     For the first approach, it's possible that we will add a config option to 
> gnome-terminal not to highlight explicit hyperlinks. For the second approach, 
> if we were about to go that road then maybe a new ANSI escape sequence would 
> need to be introduced for dotted underline, and apps like "ls" would need to 
> explicitly output it if they wanted to dotted underline their hyperlink (and 
> apps could also use this style for non-hyperlinks). (And then why not a 
> similar escape sequence for the mouse pointer shape?)
> 
>     What you suggest goes in the third, hybrid direction: have a default 
> style, but let apps somewhat override that.
> 
>     I'm not against your proposal, but I'd like to have it discussed at least 
> across iTerm2 and gnome-terminal, the two emulators that co-designed this 
> feature.
> 
>     Given that vte/gnome-terminal will have its hard code freeze in a week 
> from now for the 0.50 / 3.26 versions where this feature debuts, and I won't 
> have much time this week, I don't see a reasonable chance for this to happen 
> in the initial version.
> 
>     What I recommend is that the feature goes out as it is now currently, and 
> we wait for a year or so to gather user feedback (both here and for 
> gnome-terminal) and see what users wish for. I'm definitely up for discussing 
> possible improvements. I can promise to loop you in if I find this topic 
> being brought up somewhere.
> 
>     Does that sound reasonable for you?
> 
>     Thanks a lot,
>     e.


Yes a bit lighter underlining is a small improvement,
but it still would mean I wouldn't enable it by default.
Also it definitely would discourage enabling this on a site wide
or even a distro wide basis. I.E. would really hurt adoption IMHO.
Note I don't think it would help discoverability initially either
since a user will need to explicitly add --hyperlink to their
ls alias or whatever, so so will implicitly know files are clickable.
Given the amount of interaction with mouse and xterms it would
be discoverable enough without the dotted lines I think.
Note dotted lines are a good default in general for identifying links,
but bad in the ls case since they don't add any info.

cheers,
Pádraig



reply via email to

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