[Top][All Lists]

[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: Fri, 5 May 2017 14:05:38 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0

On 04/05/17 13:14, Egmont Koblinger wrote:
> Hi,
> Recently two popular terminal emulators, GNOME Terminal and iTerm2
> have implemented a brand new feature: explicit hyperlinks.
> Unlike the existing functionality of most terminal emulators of
> automatically detecting URLs that appear on the screen, this time it's
> like hyperlinks on web pages: the link target is specified by the OSC
> 8 escape sequence and the visible text can be an arbitrary piece of
> text.
> As I've played with this feature, I found a really compelling use
> case: listing files in a way that all of them are hyperlinks to
> "file://...". It makes it as easy and convenient as a Ctrl+click to
> open them in their preferred graphical application.
> (For even more fun, there's a pending demo patch to GNOME Terminal to
> display a preview of certain local files on mouseover. We're uncertain
> yet if we'll finalize and ship it or not.)
> I've created a quick proof of concept patch for a new cmdline option
> "ls --hyperlink=always/auto/never", have set it up in my "ls" alias,
> and been using that happily for a few weeks now. Please find it at
> Note that it
> contains a couple of issues, e.g. I forgot to free some data, and it
> does stupid things around symlinks. As said, it's a demo, not a fully
> polished patch.
> I'd be curious to hear if you like this idea, and would be happy to
> see this option appearing in mainstream coreutils.
> Please see
> for details about the feature.
> Let me know if you have any questions, concerns etc. (cc me, I'm not
> subscribed).

This could apply to any util really that displays file names,
though ls would be the most useful.
Generally it also seems useful to the case where a file has a non representable 
(well not cleanly at least without $'shell quoting').


reply via email to

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