coreutils
[Top][All Lists]
Advanced

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

Feature request: ls --hyperlink


From: Egmont Koblinger
Subject: Feature request: ls --hyperlink
Date: Thu, 4 May 2017 22:14:08 +0200

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
https://bugzilla.gnome.org/show_bug.cgi?id=779734#c126. 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 https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda
for details about the feature.

Let me know if you have any questions, concerns etc. (cc me, I'm not
subscribed).

Thanks a lot,
egmont



reply via email to

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