Lokyr
Documentation

links: ⌘-click and hints open links and paths

On this page

lokyr/links · bundled · source

A ⌘-click on text opens what the text points to: the link that the program gave it, with OSC 8, or the URL or the path that the text holds there. From the keyboard, its hints label what the pane shows, for a letter or two to open it. Links shows how to use them.

What it does

Commands

CommandDefault keysWhat it does
links.open⌘-clickOpens the link, the URL or the path at the cell clicked, as above
links.copyCopies what links.open would open at the cell: the link, the URL, or the path from /
links.new-windowOpens a window whose shell starts in the folder of the path at the cell, or in the folder that holds its file
links.new-tabOpens a tab, after the others, as links.new-window does a window
links.hints⇧⌘EShows the hints of the pane, a pick doing its action: "open" by default, "copy", "type" or "select" · Since 1.3
links.hints-actionTab, ⇧Tab while links.focusedMoves what a pick does by its delta, through open, copy, type and select · Since 1.3

The first four take the cell's column and row; the pane's context menu lists them, as Open Link, Copy Link Address, New Window at Folder and New Tab at Folder, each dimmed where the cell holds nothing that it takes: a URL of the web has no folder. A link's file: URL of this Mac, of no host, of localhost or of the Mac's name, as ls --hyperlink, ripgrep and fd write it, opens and has its folder; one of another machine opens not.

Configuration

The questions that a link asks are the app's own keys, in [links]: urls and files, each "ask" by default. The hints' are the plugin's, in [plugins.links]: hints, your patterns, and alphabet, the letters of the labels.

Turning it off

[plugins.links]
enabled = false

A ⌘-click then selects, as a click does, and holding ⌘ underlines nothing.

Permissions

It reads the terminal's text around the click, and the pane's view for its hints, and the folder of the program in the foreground, for a relative path; draws the hints' labels over the pane, opens what it finds with its application, writes the clipboard, as Copy Link Address copies, selects, and types a hint into the pane, as the hints' Type does.