-
Notifications
You must be signed in to change notification settings - Fork 29.5k
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
Linkify terminal paths without any path separators #22772
Comments
@Tyriar Can i take this ?. Could you guide me a little |
@lifez sure that would be great 😃 I'm a little concerned that this might be bad for perf if we're constantly checking whether files exist like this. It would be good to look into whether we could cache the results of an |
@Tyriar Linkify is mean we can click to file within vscode terminal ? |
@lifez yes linkify means add a link to the path. |
Current we don't have knowledge of the cwd but eventually we will #27107 so if we're building some cache we would want to allow support for different cwd. Also when are they invalidated? Should the file watcher come into play here? |
Related #25024 |
This bug is more importan than it gives impression in its description before it breaks even linters with standardized output, like:
First one is linkified but the second one is not, just because it does not have a slash in the file name. |
@sohailrajdev97 I closed #82903 in favor of this one as thinking about it more I don't think we should invest in links specifically for java and instead improve all languages. I think this issue has a number of things we can do:
The above could be tackled as individual steps/PRs. All terminal link code is in https://github.com/microsoft/vscode/blob/master/src/vs/workbench/contrib/terminal/browser/terminalLinkHandler.ts, it used this API in xterm.js to add the links: https://github.com/xtermjs/xterm.js/blob/d9f58c0dbbd73145779586a9a4caddba3871ffc1/typings/xterm.d.ts#L524-L534 |
@sohailrajdev97 I actually did some thinking and a big write up on a proposal to change how links work all together in xterm.js which should also allow us to tackle this problem in a nicer way as well as fix a bunch of other problems/inconsistencies with the terminal's link detection. See xtermjs/xterm.js#583 (comment) For that particular case in the new system that validation would happen on hover. |
This is done 🎉 any link that doesn't have a high accuracy link will revert to searching the workspace and opening the file if there's one match or the quick pick if there are multiple. |
Follow up from #22528, #22602
Currently we're limited to the current workspace (knowledge of shell's cwd is blocked on #20676), but it would be good to linkify files in the current directory that don't have path separators. This would linkify the files in
ls
for example:The text was updated successfully, but these errors were encountered: