emacs-devel
[Top][All Lists]
Advanced

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

Emacs support for --hyperlink in ls?


From: Stephen Eglen
Subject: Emacs support for --hyperlink in ls?
Date: Tue, 03 May 2022 12:08:30 +0100
User-agent: mu4e 1.6.10; emacs 28.1

Various programs, including ls (GNU coreutils 9.0), now contain
--hyperlink flag and similar to markup file names with the full
file-path.  The full file name is embedded using 'OSC 8 escape sequence'
so that it can be hidden in terminal emualators and recognised as a hyperlink.

For a video example using the kitty terminal, see

https://download.calibre-ebook.com/videos/kitty.mp4

the relevant part starts about 3min in; several other terminals also
support this feature.  Further documentation of this feature is on the
following page

https://gist.github.com/egmontkob/eb114294efbcd5adb1944c9f3cb5feda

Should Emacs support these OSC 8 hyperlinks in things like *shell*?

If I run M-x shell, of course, these hyperlinks appear verbatim.

$ ls -1 --hyperlink /etc | head -5

%1b]8;;file://light/etc/acpiacpi%1b]8;;
%1b]8;;file://light/etc/adjtimeadjtime%1b]8;;
%1b]8;;file://light/etc/alsaalsa%1b]8;;
%1b]8;;file://light/etc/anacrontabanacrontab%1b]8;;
%1b]8;;file://light/etc/ant.confant.conf%1b]8;;

If people think it worth trying, I might start hacking something to work
e.g. on comint-output-filter-functions but presumably this might be
something that eshell, ansi-term and vterm might also benefit from?

Stephen



reply via email to

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