Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test: Terminal link improvements #172084

Closed
3 tasks done
Tyriar opened this issue Jan 23, 2023 · 0 comments
Closed
3 tasks done

Test: Terminal link improvements #172084

Tyriar opened this issue Jan 23, 2023 · 0 comments

Comments

@Tyriar
Copy link
Member

Tyriar commented Jan 23, 2023

Refs: #158810, #161543, #148062, #97941

Complexity: 4

Create Issue


The terminal got a lot of improvements to links this iteration, test all the following link types:

  • vscode:// links - An example link to use is echo "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

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:

// 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()})?[\\]\\)]$`,
];

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants