Change:
Type: <bBug</bLinux using GNU coreutils to provide . I used GNU coreutils 9.1, I don't know if this will work the same in older versions. Code will detect these hyperlinks and make them clickable the link however will not open the file or directory, instead resulting in the message "The editor could not be opened because the file was not found". Examining the path that VS Code attempted to open shows that it tries to open , which does obviously not exist. The spurious -part needs to go away. Tested in both bash and zsh, both exhibited the issue. The Kitty terminal emulator correctly handles the hyperlinks that produces. Looking in a hexeditor at what GNU coreutils outputs, it includes the hostname part (e.g. . Presumably this is to allow the feature to work properly over ssh if the consumer of the URI is inclined to handle that case. Looking at the relevant RFC for file URIs () this is entirely valid. The hostname is optional, and if not given it defaults to localhost. VSCode should at least detect and handle the case where an explicit hostname is given to see if it matches the local hostname. The current behaviour that the host name is part of the path is buggy, as is not valid, it has to be either or to refer to the actual local host (so either 1 or 3 slashes in there). Thus there is no ambiguity according to the specification. However that is not what VSCode actually does (when given a bare URI printed with echo): It appears that VSCode only handles the final case correctly. If we add the requsite terminal control codes to turn it into the same type of hyperlink as used by : VS Code version: Code 1.72.1 (, 2022-10-10T17:23:00.760Z) OS version: Linux x64 5.15.72-1-lts Modes: Sandboxed: No <details<summarySystem Info</summary </details<details<summaryExtensions (23)</summaryExtensionVersion ------ vsc-prolog0.8.23 doxdocgen1.4.0 latex-workshop8.29.0 better-cpp-syntax1.16.1 vscode-graphviz0.0.6 vscode-docker1.22.1 python2022.16.0 vscode-pylance2022.10.20 jupyter2022.9. jupyter-keymap1.0.0 jupyter-renderers1.0.10 vscode-jupyter-cell-tags0.1.6 vscode-jupyter-slideshow0.1.5 remote-containers0.255.3 remote-ssh0.90.1 remote-ssh-edit0.84.0 remote-wsl0.72.0 cmake-tools1.12.27 cpptools1.12.4 cpptools-extension-pack1.3.0 linux-desktop-file0.0.21 cmake0.0.17 vscode-ltex13.1.0 (1 theme extensions excluded) </details<!-- generated by issue reporter --
Can repro: ! We don't have support for the hostname yet as you suspected
Example output from :
PowerShell repro:
Should be fixed in , will need to verify in Linux to make sure it works properly there as I tested using Windows URIs.
Using codespaces. Works for files but not for folders https://user-
Forking off as this will be on the release notes but folder links don't meet the cut for Jan

Discussion:
continue; } <del> const linkStat = await this._resolvePath(text, uri); // Create the link if validated if (linkStat) { let type: TerminalBuiltinLinkType; if (linkStat.isDirectory) { if (this._isDirectoryInsideWorkspace(linkStat.uri)) { type = TerminalBuiltinLinkType.LocalFolderInWorkspace; </del> <ins> // As a fallback URI, treat the authority as local to the workspace. This is required // for `ls --hyperlink` support for example which includes the hostname in the URI like // `file://Some-Hostname/mnt/c/foo/bar`. const uriCandidates: URI[] = [uri]; if (uri.authority.length > 0) { uriCandidates.push(URI.from({ ...uri, authority: undefined })); } // Iterate over all candidates, pushing the candidate on the first that's verified for (const uriCandidate of uriCandidates) { const linkStat = await this._resolvePath(text, uriCandidate); // Create the link if validated if (linkStat) { let type: TerminalBuiltinLinkType; if (linkStat.isDirectory) { if (this._isDirectoryInsideWorkspace(uriCandidate)) { type = TerminalBuiltinLinkType.LocalFolderInWorkspace; } else { type = TerminalBuiltinLinkType.LocalFolderOutsideWorkspace; } </ins> } else { <del> type = TerminalBuiltinLinkType.LocalFolderOutsideWorkspace; </del> <ins> type = TerminalBuiltinLinkType.LocalFile; </ins> } <del> } else { type = TerminalBuiltinLinkType.LocalFile; } links.push({ // Use computedLink.url if it's a string to retain the line/col suffix text: typeof computedLink.url === 'string' ? computedLink.url : linkStat.link, uri: linkStat.uri, bufferRange, type }); // Stop early if too many links exist in the line if (++resolvedLinkCount >= Constants.MaxResolvedLinksInLine) { </del> <ins> links.push({ // Use computedLink.url if it's a string to retain the line/col suffix text: typeof computedLink.url === 'string' ? computedLink.url : linkStat.link, uri: uriCandidate, bufferRange, type }); resolvedLinkCount++; </ins> break; } } <ins> // Stop early if too many links exist in the line if (++resolvedLinkCount >= Constants.MaxResolvedLinksInLine) { break; } </ins> } return links;