-
Notifications
You must be signed in to change notification settings - Fork 38.2k
Closed
Labels
Milestone
Description
Refs: #158810, #161543, #148062, #97941
- macOS @isidorn
- linux @andreamah
- windows @joyceerhl
Complexity: 4
The terminal got a lot of improvements to links this iteration, test all the following link types:
vscode://links - An example link to use isecho "vscode-insiders://file/C:/Users/Daniel/Downloads/image.png"using a valid path on your system- Links containing
[and]- See Full support for local files and folders containing [ and ] chars #169774 for a list of format examples that should work /mnt/,\\wsl.localhost\and\\wsl$\links - Examples:/mnt/c/Users/Daniel/Documents/somefile.txt\\wsl.localhost\Debian\home\daniel\somefile.txt\\wsl$\Debian\home\daniel\somefile.txt
- Links containing spaces. The following formats should work:
- When the entire line is a valid file (and a portion of it was not yet matched to another valid file link):
<path> - Python style links:
From "<path>", line <line> - C++ compiler(?) style errors:
<path>(<line>,<col>) :<...> - Independently styled file paths:
foo<underlined_path>bar
- When the entire line is a valid file (and a portion of it was not yet matched to another valid file link):
All formats should work for both files and folders, and all except for vscode:// should work with the various line/col matching patterns detailed here:
vscode/src/vs/workbench/contrib/terminal/browser/links/terminalLinkParsing.ts
Lines 21 to 57 in 61a60bc
| // The comments in the regex below use real strings/numbers for better readability, here's | |
| // the legend: | |
| // - Path = foo | |
| // - Row = 339 | |
| // - Col = 12 | |
| // | |
| // These all support single quote ' in the place of " and [] in the place of () | |
| const lineAndColumnRegexClauses = [ | |
| // foo:339 | |
| // foo:339:12 | |
| // foo 339 | |
| // foo 339:12 [#140780] | |
| // "foo",339 | |
| // "foo",339:12 | |
| `(?::| |['"],)${l()}(:${c()})?$`, | |
| // The quotes below are optional [#171652] | |
| // "foo", line 339 [#40468] | |
| // "foo", line 339, col 12 | |
| // "foo", line 339, column 12 | |
| // "foo":line 339 | |
| // "foo":line 339, col 12 | |
| // "foo":line 339, column 12 | |
| // "foo": line 339 | |
| // "foo": line 339, col 12 | |
| // "foo": line 339, column 12 | |
| // "foo" on line 339 | |
| // "foo" on line 339, col 12 | |
| // "foo" on line 339, column 12 | |
| `['"]?(?:, |: ?| on )line ${l()}(, col(?:umn)? ${c()})?$`, | |
| // foo(339) | |
| // foo(339,12) | |
| // foo(339, 12) | |
| // foo (339) | |
| // foo (339,12) | |
| // foo (339, 12) | |
| ` ?[\\[\\(]${l()}(?:, ?${c()})?[\\]\\)]$`, | |
| ]; |
Reactions are currently unavailable